Rasterfarm-SDK
Loading...
Searching...
No Matches
JpegImage Class Reference

#include <jpegimage.h>

Inheritance diagram for JpegImage:
Image

Public Member Functions

 JpegImage (const char *filename)
 
virtual ~JpegImage ()
 
virtual Byte * allocAndCreatePixels ()
 
virtual void save (const char *file)
 
- Public Member Functions inherited from Image
 Image (const char *filename)
 
virtual ~Image ()
 
uint getWidth () const
 
uint getHeight () const
 
Format getFormat () const
 
Byte * getData () const
 

Static Public Member Functions

static void save (const char *file, Texture *pTexture, TextureType target=QUAD_MAP)
 
static void writeImageToFile (Byte *pData, uint width, uint height, Image::Format format, const char *filename, int quality)
 
- Static Public Member Functions inherited from Image
static ImagecreateImage (const char *filename)
 
static bool isValid (const char *filename, const ByteArray &magic)
 
static size_t byteSize (PixelFormat pixelFormat)
 
static Format convert (PixelFormat pixelFormat)
 
static bool hasAlpha (PixelFormat pixelFormat)
 
static PixelFormat removeAlpha (PixelFormat pixelFormat)
 

Static Public Attributes

static const ByteArray magic
 

Additional Inherited Members

- Public Types inherited from Image
enum  Format {
  RGB_565 ,
  RGB_888 ,
  BGR_888 ,
  RGBA_8888 ,
  BGRA_8888 ,
  RGBA_5551 ,
  RGBA_4444 ,
  BGRA_4444 ,
  ALPHA_8 ,
  GRAY_8 ,
  GRAY_16 ,
  GRAY_ALPHA_8_8 ,
  GRAY_ALPHA_15_1 ,
  DEPTH_8 ,
  DEPTH_16 ,
  DEPTH_24
}
 
- Public Attributes inherited from Image
size_t dataSize
 
- Protected Attributes inherited from Image
uint width
 
uint height
 
uint channels
 
Format format
 
Byte * pData
 

Constructor & Destructor Documentation

◆ JpegImage()

JpegImage::JpegImage ( const char * filename)

◆ ~JpegImage()

virtual JpegImage::~JpegImage ( )
virtual

Member Function Documentation

◆ allocAndCreatePixels()

virtual Byte * JpegImage::allocAndCreatePixels ( )
virtual

Creates a new array of pixels on the heap. Caller must delete as this data is not managed.

Returns
Byte array.

Implements Image.

◆ save() [1/2]

virtual void JpegImage::save ( const char * file)
virtual

Saves a texture to the filesystem.

Parameters
Pointerto texture.
Thetexture's target-data to save. If not specified the QUAD target will be selected.

Implements Image.

◆ save() [2/2]

static void JpegImage::save ( const char * file,
Texture * pTexture,
TextureType target = QUAD_MAP )
static

◆ writeImageToFile()

static void JpegImage::writeImageToFile ( Byte * pData,
uint width,
uint height,
Image::Format format,
const char * filename,
int quality )
static

Member Data Documentation

◆ magic

const ByteArray JpegImage::magic
static

The documentation for this class was generated from the following file: