Compounds | |
struct | FormatDesc |
class | DLLInterface |
class | DLLImplementation |
class | Image |
class | File |
class | FileFormatDesc |
Describes a file format that Corona supports. More... | |
class | CFile |
class | MemoryFile |
struct | Header |
struct | InternalStruct |
class | SimpleImage |
class | auto_array |
struct | RGB |
struct | RGBA |
struct | BGR |
struct | BGRA |
Typedefs | |
typedef unsigned char | byte |
typedef unsigned short | u16 |
typedef unsigned long | u32 |
Enumerations | |
enum | FileFormat { FF_AUTODETECT = 0x0100, FF_PNG = 0x0101, FF_JPEG = 0x0102, FF_PCX = 0x0103, FF_BMP = 0x0104, FF_TGA = 0x0105, FF_GIF = 0x0106 } |
enum | PixelFormat { PF_DONTCARE = 0x0200, PF_R8G8B8A8 = 0x0201, PF_R8G8B8 = 0x0202, PF_I8 = 0x0203, PF_B8G8R8A8 = 0x0204, PF_B8G8R8 = 0x0205 } |
enum | CoordinateAxis { CA_X = 0x0001, CA_Y = 0x0002 } |
Functions | |
Image * | ExpandPalette (Image *image) |
FormatDesc * | GetDescription (PixelFormat format) |
bool | ConvertPixels (byte *out, PixelFormat out_format, const byte *in, PixelFormat in_format, int pixel_count) |
Image * | DirectConversion (Image *image, PixelFormat target_format) |
const char * | GetVersion () |
FileFormatDesc ** | GetSupportedReadFormats () |
FileFormatDesc ** | GetSupportedWriteFormats () |
Image * | CreateImage (int width, int height, PixelFormat format, void *pixels=0) |
Image * | CreateImage (int width, int height, PixelFormat format, int palette_size, PixelFormat palette_format) |
Image * | CloneImage (Image *source, PixelFormat format=PF_DONTCARE) |
Image * | OpenImage (const char *filename, PixelFormat pixel_format=PF_DONTCARE, FileFormat file_format=FF_AUTODETECT) |
Image * | OpenImage (File *file, PixelFormat pixel_format=PF_DONTCARE, FileFormat file_format=FF_AUTODETECT) |
Image * | OpenImage (const char *filename, FileFormat file_format, PixelFormat pixel_format=PF_DONTCARE) |
For compatibility. This function may be deprecated. | |
Image * | OpenImage (File *file, FileFormat file_format, PixelFormat pixel_format=PF_DONTCARE) |
For compatibility. This function may be deprecated. | |
bool | SaveImage (const char *filename, FileFormat file_format, Image *image) |
bool | SaveImage (File *file, FileFormat file_format, Image *image) |
Image * | ConvertImage (Image *source, PixelFormat format) |
Image * | ConvertPalette (Image *source, PixelFormat palette_format) |
Image * | FlipImage (Image *source, int coordinate_axis) |
File * | OpenFile (const char *filename, bool writeable) |
File * | CreateMemoryFile (const void *buffer, int size) |
int | GetPixelSize (PixelFormat format) |
bool | IsDirect (PixelFormat format) |
bool | IsPalettized (PixelFormat format) |
int | GetPaletteSize (PixelFormat format) |
COR_EXPORT (File *) CorOpenFile(const char *filename | |
Image * | OpenBMP (File *file) |
Image * | OpenJPEG (File *file) |
Image * | OpenPCX (File *file) |
Image * | OpenPNG (File *file) |
Image * | OpenTGA (File *file) |
Image * | OpenGIF (File *file) |
bool | ReadHeader (File *file, Header &h) |
bool | ReadInfoHeader (File *file, Header &h) |
bool | ReadPalette (File *file, Header &h) |
Image * | DecodeBitmap (File *file, const Header &h) |
int | count_right_zeroes (u32 n) |
int | count_ones (u32 n) |
bool | advance (int &x, int &y, const Header &h) |
Image * | ReadBitmap1 (const byte *raster_data, const Header &h) |
Image * | ReadBitmap4 (const byte *raster_data, const Header &h) |
Image * | ReadBitmapRLE4 (const byte *raster_data, const Header &h) |
Image * | ReadBitmap8 (const byte *raster_data, const Header &h) |
Image * | ReadBitmapRLE8 (const byte *raster_data, const Header &h) |
Image * | ReadBitmap16 (const byte *raster_data, const Header &h) |
Image * | ReadBitmap24 (const byte *raster_data, const Header &h) |
Image * | ReadBitmap32 (const byte *raster_data, const Header &h) |
int | InputFunc (GifFileType *gif, GifByteType *bytes, int size) |
void | JPEG_init_source (j_decompress_ptr cinfo) |
boolean | JPEG_fill_input_buffer (j_decompress_ptr cinfo) |
void | JPEG_skip_input_data (j_decompress_ptr cinfo, long num_bytes) |
void | JPEG_term_source (j_decompress_ptr cinfo) |
void | JPEG_error_exit (j_common_ptr cinfo) |
void | JPEG_emit_message (j_common_ptr cinfo, int msg_level) |
bool | ReadScanline (File *file, int scansize, byte *scanline) |
void | PNG_read_function (png_structp png_ptr, png_bytep data, png_size_t length) |
void | PNG_warning_function (png_structp png_ptr, png_const_charp error) |
void | PNG_error_function (png_structp png_ptr, png_const_charp warning) |
void | fill_palette (png_structp png, png_infop info, png_color palette[256]) |
bool | SavePNG (File *file, Image *image) |
bool | SaveTGA (File *file, Image *image) |
void | PNG_write (png_structp png_ptr, png_bytep data, png_size_t length) |
void | PNG_flush (png_structp png_ptr) |
u16 | read16_le (const byte *b) |
void | write16_le (byte *b, u16 value) |
u16 | read16_be (const byte *b) |
void | write16_be (byte *b, u16 value) |
u32 | read32_le (const byte *b) |
u32 | read32_be (const byte *b) |
|
Definition at line 16 of file OpenPNG.cpp. Referenced by OpenPNG(). |
|
Definition at line 19 of file Types.h. Referenced by read16_be(), read16_le(), write16_be(), and write16_le(). |
|
Definition at line 20 of file Types.h. Referenced by count_ones(), count_right_zeroes(), read32_be(), read32_le(), and ReadBitmap32(). |
|
File formats supported for reading or writing. Definition at line 68 of file corona.h. Referenced by corona::hidden::FFDImpl::FFDImpl(), corona::hidden::FFDImpl::getDescription(), OpenImage(), and SaveImage(). |
|
Pixel format specifications. Pixel data can be packed in one of the following ways.
Definition at line 82 of file corona.h. Referenced by ImageTestCase::AssertImagesEqual(), CloneImage(), ConvertImage(), ConvertPalette(), ConvertPixels(), CreateImage(), DirectConversion(), ExpandPalette(), GetDescription(), corona::SimpleImage::getFormat(), TestDeletionImage::getFormat(), corona::SimpleImage::getPaletteFormat(), TestDeletionImage::getPaletteFormat(), GetPaletteSize(), GetPixelSize(), IsDirect(), IsPalettized(), OpenImage(), OpenPNG(), OpenTGA(), APITests::testBasicOperations(), and TestDeletionImage::TestDeletionImage(). |
|
Axis specifications. The image can be flipped along the following axes. |
|
|
Definition at line 65 of file Convert.cpp. References DEFINE_DESC, corona::hidden::format, PF_B8G8R8, PF_B8G8R8A8, PF_R8G8B8, PF_R8G8B8A8, and PixelFormat. Referenced by ConvertPixels(). |
|
Definition at line 78 of file Convert.cpp. References corona::FormatDesc::a_shift, corona::FormatDesc::b_shift, corona::FormatDesc::g_shift, GetDescription(), GetPixelSize(), corona::FormatDesc::has_alpha, PixelFormat, and corona::FormatDesc::r_shift. Referenced by DirectConversion(). |
|
Definition at line 112 of file Convert.cpp. References ConvertPixels(), COR_GUARD, corona::Image::getFormat(), corona::Image::getHeight(), corona::Image::getPixels(), GetPixelSize(), corona::Image::getWidth(), corona::hidden::height, corona::hidden::image, and PixelFormat. |
|
Return the Corona version string.
|
|
Returns a null-terminated array of FileFormatDesc* pointers that describe the file formats Corona can read. The array is owned by Corona, so do not delete it when you are done using it. |
|
Returns a null-terminated array of FileFormatDesc* pointers that describe the file formats Corona can write. The array is owned by Corona, so do not delete it when you are done using it. |
|
Create a new, blank image with a specified width, height, and format. If pixels is specified, Corona uses them to initialize the contents of the image. Corona does *not* take ownership of the pixel memory, so the caller is responsible for cleaning up after itself. If pixels is not specified, the new image is filled with zeroes.
Definition at line 430 of file corona.h. References corona::hidden::format, corona::hidden::height, PixelFormat, and corona::hidden::pixels. |
|
Create a new, blank image with a specified width, height, format, and palette.
Definition at line 449 of file corona.h. References corona::hidden::format, corona::hidden::height, corona::hidden::palette_format, corona::hidden::palette_size, and PixelFormat. |
|
Create a new image from an old one. If format is specified, the new image is converted to that pixel format. If format is not specified, the new image simply uses the same format as the source. If the image could not be cloned or the pixel format is invalid, CloneImage returns 0.
Definition at line 473 of file corona.h. References corona::hidden::format, PF_DONTCARE, and PixelFormat. Referenced by SavePNG(), SaveTGA(), PaletteTests::testAPI(), and APITests::testBasicOperations(). |
|
Opens an image from the default filesystem. This function simply forwards the call to OpenImage(file, file_format, pixel_format) with a standard C library file. See OpenImage(fs, filename, file_format, pixel_format) for more information.
Definition at line 496 of file corona.h. References FF_AUTODETECT, corona::hidden::file_format, FileFormat, PF_DONTCARE, and PixelFormat. Referenced by OpenImage(). |
|
Opens an image from the specified file. If file_format is FF_AUTODETECT, the loader tries to load each format until it finds one that succeeds. Otherwise, it tries the specific loader specified. If pixel_format is PF_DONTCARE, the new image object has the pixel format closest to the image's format on disk. Otherwise, the pixels are converted to the specified format before the image is returned.
Definition at line 526 of file corona.h. References FF_AUTODETECT, corona::hidden::file_format, FileFormat, PF_DONTCARE, and PixelFormat. |
|
For compatibility. This function may be deprecated.
Definition at line 537 of file corona.h. References corona::hidden::file_format, FileFormat, OpenImage(), PF_DONTCARE, and PixelFormat. |
|
For compatibility. This function may be deprecated.
Definition at line 546 of file corona.h. References corona::hidden::file_format, FileFormat, OpenImage(), PF_DONTCARE, and PixelFormat. |
|
Saves an image to a file in the default filesystem. This function simply calls SaveImage(file, file_format, image) with a standard C library file. See SaveImage(fs, filename, file_format, image) for more information.
Definition at line 568 of file corona.h. References corona::hidden::file_format, FileFormat, and corona::hidden::image. |
|
Saves an image to the specified file. This function saves image to a file of type file_format. If file_format is not a supported output type, the function fails. As of now, Corona only supports saving images of type FF_PNG and FF_TGA.
Definition at line 593 of file corona.h. References corona::hidden::file_format, FileFormat, and corona::hidden::image. |
|
Converts an image from one format to another, destroying the old image. If source is 0, the function returns 0. If format is PF_DONTCARE or the source and target formats match, returns the unmodified source image. If a valid conversion is not found, ConvertImage destroys the old image and returns 0. For example, ConvertImage does not support creating a palettized image from a direct color image yet.
Definition at line 615 of file corona.h. References corona::hidden::format, and PixelFormat. Referenced by APITests::testMemory(). |
|
Converts the palette of a palettized image from one format to another, destroying the old image. If the source is 0, the palette_format is PF_DONTCARE, or the source and target formats match, the function returns the unmodified source image. If a valid conversion is not found or invalid inputs are given (such as a direct-color source image), this function destroys the old image and returns 0.
Definition at line 633 of file corona.h. References corona::hidden::palette_format, and PixelFormat. Referenced by PaletteTests::testAPI(), and APITests::testMemory(). |
|
Flips the pixels in the image around the given axis.
Definition at line 646 of file corona.h. References corona::hidden::coordinate_axis. Referenced by APITests::testBasicOperations(), and APITests::testMemory(). |
|
Returns a default File implementation.
Definition at line 656 of file corona.h. References corona::hidden::writeable. |
|
Creates a File implementation that reads from a buffer in memory. It stores a copy of the buffer that is passed in. The File object does not take ownership of the memory buffer. When the file is destroyed, it will not free the memory.
Definition at line 673 of file corona.h. References corona::hidden::size. Referenced by FileTests::testMemoryFiles(), and FileTests::testMemoryLoads(). |
|
Returns the number of bytes needed to store a pixel of a gixen format.
Definition at line 684 of file corona.h. References corona::hidden::format, and PixelFormat. Referenced by ImageTestCase::AssertImagesEqual(), ConvertPixels(), DirectConversion(), ExpandPalette(), and APITests::testFormatQueries(). |
|
Returns true if the pixel format does not require a palette; that is, if each pixel itself contains color data.
Definition at line 696 of file corona.h. References corona::hidden::format, PF_B8G8R8, PF_B8G8R8A8, PF_R8G8B8, PF_R8G8B8A8, and PixelFormat. Referenced by APITests::testFormatQueries(). |
|
Returns true if the pixel format requires a palette; that is, if each pixel is an index into a separate palette.
Definition at line 709 of file corona.h. References corona::hidden::format, PF_I8, and PixelFormat. Referenced by APITests::testFormatQueries(). |
|
Returns the number of color entries in a palette for an image of the given format.
Definition at line 721 of file corona.h. References corona::hidden::format, PF_I8, and PixelFormat. Referenced by APITests::testFormatQueries(). |
|
|
|
Definition at line 46 of file OpenBMP.cpp. References DecodeBitmap(), ReadHeader(), ReadInfoHeader(), and ReadPalette(). |
|
Definition at line 35 of file OpenJPEG.cpp. References corona::InternalStruct::error_mgr, corona::InternalStruct::file, corona::hidden::height, corona::hidden::image, JPEG_error_exit(), JPEG_fill_input_buffer(), JPEG_init_source(), JPEG_skip_input_data(), JPEG_term_source(), PF_R8G8B8, and corona::hidden::pixels. |
|
Definition at line 68 of file OpenPCX.cpp. References COR_GUARD, COR_IF_DEBUG, COR_LOG, corona::hidden::height, corona::hidden::image, PF_I8, PF_R8G8B8, corona::hidden::pixels, corona::File::read(), read16_le(), ReadScanline(), corona::auto_array< T >::release(), and corona::File::seek(). |
|
Definition at line 90 of file OpenPNG.cpp. References byte, COR_GUARD, COR_LOG, fill_palette(), corona::hidden::format, corona::hidden::height, corona::hidden::palette_format, PF_I8, PF_R8G8B8, PF_R8G8B8A8, PixelFormat, corona::hidden::pixels, PNG_error_function(), PNG_read_function(), PNG_warning_function(), and corona::File::read(). |
|
Definition at line 9 of file OpenTGA.cpp. References COR_GUARD, COR_LOG, corona::hidden::format, corona::auto_array< T >::get(), corona::hidden::height, PF_B8G8R8, PF_B8G8R8A8, PixelFormat, corona::hidden::pixels, corona::File::read(), and read16_le(). |
|
Definition at line 18 of file OpenGIF.cpp. References COR_GUARD, COR_IF_DEBUG, COR_LOG, corona::hidden::height, corona::hidden::image, InputFunc(), PF_I8, PF_R8G8B8A8, and corona::auto_array< T >::release(). |
|
Definition at line 62 of file OpenBMP.cpp. References corona::Header::data_offset, corona::Header::file_size, corona::File::read(), and read32_le(). Referenced by OpenBMP(). |
|
Definition at line 79 of file OpenBMP.cpp. References corona::Header::bpp, corona::Header::compression, corona::Header::height, corona::hidden::height, corona::Header::image_size, corona::Header::os2, corona::Header::pitch, corona::File::read(), read16_le(), read32_le(), corona::File::seek(), corona::hidden::size, and corona::Header::width. Referenced by OpenBMP(). |
|
|
Definition at line 640 of file OpenBMP.cpp. References corona::Header::bpp, corona::Header::compression, corona::Header::data_offset, corona::auto_array< T >::get(), corona::Header::height, corona::Header::image_size, corona::hidden::pixels, corona::File::read(), ReadBitmap1(), ReadBitmap16(), ReadBitmap24(), ReadBitmap32(), ReadBitmap4(), ReadBitmap8(), ReadBitmapRLE4(), ReadBitmapRLE8(), corona::File::seek(), and corona::Header::width. Referenced by OpenBMP(). |
|
Definition at line 152 of file OpenBMP.cpp. References u32. Referenced by ReadPalette(). |
|
Definition at line 164 of file OpenBMP.cpp. References u32. Referenced by ReadPalette(). |
|
Definition at line 268 of file OpenBMP.cpp. References corona::Header::height, and corona::Header::width. Referenced by ReadBitmapRLE4(), and ReadBitmapRLE8(). |
|
Definition at line 278 of file OpenBMP.cpp. References corona::Header::height, corona::Header::palette, corona::Header::palette_size, PF_B8G8R8, PF_I8, corona::Header::pitch, corona::hidden::pixels, corona::auto_array< T >::release(), and corona::Header::width. Referenced by DecodeBitmap(). |
|
Definition at line 305 of file OpenBMP.cpp. References corona::Header::height, corona::Header::palette, corona::Header::palette_size, PF_B8G8R8, PF_I8, corona::Header::pitch, corona::hidden::pixels, corona::auto_array< T >::release(), and corona::Header::width. Referenced by DecodeBitmap(). |
|
Definition at line 332 of file OpenBMP.cpp. References advance(), corona::Header::height, corona::Header::image_size, corona::Header::palette, corona::Header::palette_size, PF_B8G8R8, PF_I8, corona::hidden::pixels, corona::auto_array< T >::release(), and corona::Header::width. Referenced by DecodeBitmap(). |
|
Definition at line 452 of file OpenBMP.cpp. References corona::Header::height, corona::Header::palette, corona::Header::palette_size, PF_B8G8R8, PF_I8, corona::Header::pitch, corona::hidden::pixels, corona::auto_array< T >::release(), and corona::Header::width. Referenced by DecodeBitmap(). |
|
Definition at line 472 of file OpenBMP.cpp. References advance(), corona::Header::height, corona::Header::image_size, corona::Header::palette, corona::Header::palette_size, PF_B8G8R8, PF_I8, corona::hidden::pixels, corona::auto_array< T >::release(), and corona::Header::width. Referenced by DecodeBitmap(). |
|
Definition at line 573 of file OpenBMP.cpp. References corona::RGB::blue, corona::RGB::green, corona::Header::height, PF_R8G8B8, corona::Header::pitch, corona::hidden::pixels, read16_le(), corona::RGB::red, and corona::Header::width. Referenced by DecodeBitmap(). |
|
Definition at line 600 of file OpenBMP.cpp. References corona::BGR::blue, corona::BGR::green, corona::Header::height, PF_B8G8R8, corona::Header::pitch, corona::hidden::pixels, corona::BGR::red, and corona::Header::width. Referenced by DecodeBitmap(). |
|
Definition at line 619 of file OpenBMP.cpp. References corona::Header::bf_blue_mask, corona::Header::bf_blue_shift, corona::Header::bf_green_mask, corona::Header::bf_green_shift, corona::Header::bf_red_mask, corona::Header::bf_red_shift, corona::RGB::blue, corona::RGB::green, corona::Header::height, PF_R8G8B8, corona::Header::pitch, corona::hidden::pixels, read32_le(), corona::RGB::red, u32, and corona::Header::width. Referenced by DecodeBitmap(). |
|
Definition at line 13 of file OpenGIF.cpp. References corona::File::read(), and corona::hidden::size. Referenced by OpenGIF(). |
|
Definition at line 131 of file OpenJPEG.cpp. Referenced by OpenJPEG(). |
|
Definition at line 137 of file OpenJPEG.cpp. References corona::InternalStruct::buffer, corona::InternalStruct::file, and corona::File::read(). Referenced by JPEG_skip_input_data(), and OpenJPEG(). |
|
Definition at line 157 of file OpenJPEG.cpp. References JPEG_fill_input_buffer(). Referenced by OpenJPEG(). |
|
Definition at line 171 of file OpenJPEG.cpp. Referenced by OpenJPEG(). |
|
Definition at line 177 of file OpenJPEG.cpp. References corona::InternalStruct::error_mgr. Referenced by OpenJPEG(). |
|
Definition at line 184 of file OpenJPEG.cpp. |
|
Definition at line 36 of file OpenPCX.cpp. References corona::File::read(). Referenced by OpenPCX(). |
|
Definition at line 21 of file OpenPNG.cpp. References corona::File::read(). Referenced by OpenPNG(). |
|
Definition at line 32 of file OpenPNG.cpp. Referenced by OpenPNG(). |
|
Definition at line 38 of file OpenPNG.cpp. Referenced by OpenPNG(). |
|
Definition at line 47 of file OpenPNG.cpp. References COR_GUARD, COR_IF_DEBUG, and COR_LOG. Referenced by OpenPNG(). |
|
|
Definition at line 9 of file SaveTGA.cpp. References CloneImage(), COR_GUARD, corona::Image::getHeight(), corona::Image::getPixels(), corona::Image::getWidth(), corona::hidden::height, corona::hidden::image, PF_B8G8R8A8, corona::File::write(), and write16_le(). |
|
Definition at line 9 of file SavePNG.cpp. References corona::File::write(). Referenced by SavePNG(). |
|
Definition at line 16 of file SavePNG.cpp. Referenced by SavePNG(). |
|
Definition at line 70 of file Utility.h. References u16. Referenced by OpenPCX(), OpenTGA(), read32_le(), ReadBitmap16(), and ReadInfoHeader(). |
|
Definition at line 74 of file Utility.h. References u16. Referenced by SaveTGA(). |
|
Definition at line 79 of file Utility.h. References u16. Referenced by read32_be(). |
|
Definition at line 83 of file Utility.h. References u16. |
|
Definition at line 88 of file Utility.h. References read16_le(), and u32. Referenced by ReadBitmap32(), ReadHeader(), ReadInfoHeader(), and ReadPalette(). |
|
Definition at line 92 of file Utility.h. References read16_be(), and u32. |