Main Page   Namespace List   Class Hierarchy   Alphabetical List   Compound List   File List   Namespace Members   Compound Members   File Members   Related Pages  

corona Namespace Reference


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

ImageExpandPalette (Image *image)
FormatDescGetDescription (PixelFormat format)
bool ConvertPixels (byte *out, PixelFormat out_format, const byte *in, PixelFormat in_format, int pixel_count)
ImageDirectConversion (Image *image, PixelFormat target_format)
const char * GetVersion ()
FileFormatDesc ** GetSupportedReadFormats ()
FileFormatDesc ** GetSupportedWriteFormats ()
ImageCreateImage (int width, int height, PixelFormat format, void *pixels=0)
ImageCreateImage (int width, int height, PixelFormat format, int palette_size, PixelFormat palette_format)
ImageCloneImage (Image *source, PixelFormat format=PF_DONTCARE)
ImageOpenImage (const char *filename, PixelFormat pixel_format=PF_DONTCARE, FileFormat file_format=FF_AUTODETECT)
ImageOpenImage (File *file, PixelFormat pixel_format=PF_DONTCARE, FileFormat file_format=FF_AUTODETECT)
ImageOpenImage (const char *filename, FileFormat file_format, PixelFormat pixel_format=PF_DONTCARE)
 For compatibility. This function may be deprecated.

ImageOpenImage (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)
ImageConvertImage (Image *source, PixelFormat format)
ImageConvertPalette (Image *source, PixelFormat palette_format)
ImageFlipImage (Image *source, int coordinate_axis)
FileOpenFile (const char *filename, bool writeable)
FileCreateMemoryFile (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
ImageOpenBMP (File *file)
ImageOpenJPEG (File *file)
ImageOpenPCX (File *file)
ImageOpenPNG (File *file)
ImageOpenTGA (File *file)
ImageOpenGIF (File *file)
bool ReadHeader (File *file, Header &h)
bool ReadInfoHeader (File *file, Header &h)
bool ReadPalette (File *file, Header &h)
ImageDecodeBitmap (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)
ImageReadBitmap1 (const byte *raster_data, const Header &h)
ImageReadBitmap4 (const byte *raster_data, const Header &h)
ImageReadBitmapRLE4 (const byte *raster_data, const Header &h)
ImageReadBitmap8 (const byte *raster_data, const Header &h)
ImageReadBitmapRLE8 (const byte *raster_data, const Header &h)
ImageReadBitmap16 (const byte *raster_data, const Header &h)
ImageReadBitmap24 (const byte *raster_data, const Header &h)
ImageReadBitmap32 (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)


Detailed Description

Todo:
use our own longjmp instead of libpng's. this way we don't need to use PNG_SETJMP_SUPPORTED in Windows, and don't depend on png_ptr->jmpbuf in older versions of libpng.


Typedef Documentation

typedef unsigned char corona::byte
 

Definition at line 16 of file OpenPNG.cpp.

Referenced by OpenPNG().

typedef unsigned short corona::u16
 

Definition at line 19 of file Types.h.

Referenced by read16_be(), read16_le(), write16_be(), and write16_le().

typedef unsigned long corona::u32
 

Definition at line 20 of file Types.h.

Referenced by count_ones(), count_right_zeroes(), read32_be(), read32_le(), and ReadBitmap32().


Enumeration Type Documentation

enum corona::FileFormat
 

File formats supported for reading or writing.

Enumeration values:
FF_AUTODETECT 
FF_PNG 
FF_JPEG 
FF_PCX 
FF_BMP 
FF_TGA 
FF_GIF 

Definition at line 68 of file corona.h.

Referenced by corona::hidden::FFDImpl::FFDImpl(), corona::hidden::FFDImpl::getDescription(), OpenImage(), and SaveImage().

enum corona::PixelFormat
 

Pixel format specifications. Pixel data can be packed in one of the following ways.

Enumeration values:
PF_DONTCARE  special format used when specifying a desired pixel format
PF_R8G8B8A8  RGBA, channels have eight bits of precision
PF_R8G8B8  RGB, channels have eight bits of precision
PF_I8  Palettized, 8-bit indices into palette
PF_B8G8R8A8  BGRA, channels have eight bits of precision
PF_B8G8R8  BGR, channels have eight bits of precision

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().

enum corona::CoordinateAxis
 

Axis specifications. The image can be flipped along the following axes.

Enumeration values:
CA_X 
CA_Y 

Definition at line 96 of file corona.h.


Function Documentation

Image* ExpandPalette Image   image
 

Definition at line 15 of file Convert.cpp.

References COR_GUARD, corona::Image::getHeight(), corona::Image::getPalette(), corona::Image::getPaletteFormat(), corona::Image::getPixels(), GetPixelSize(), corona::Image::getWidth(), corona::hidden::height, corona::hidden::image, corona::hidden::palette_format, PixelFormat, and corona::hidden::pixels.

FormatDesc* GetDescription PixelFormat    format
 

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().

bool ConvertPixels byte   out,
PixelFormat    out_format,
const byte   in,
PixelFormat    in_format,
int    pixel_count
 

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().

Image* DirectConversion Image   image,
PixelFormat    target_format
 

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.

const char* GetVersion   [inline]
 

Return the Corona version string.

Returns:
Corona version information

Definition at line 391 of file corona.h.

FileFormatDesc** GetSupportedReadFormats   [inline]
 

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.

Definition at line 401 of file corona.h.

FileFormatDesc** GetSupportedWriteFormats   [inline]
 

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.

Definition at line 410 of file corona.h.

Image* CreateImage int    width,
int    height,
PixelFormat    format,
void *    pixels = 0
[inline]
 

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.

Parameters:
width width of the new image
height height of the new image
format format the pixels are stored in, cannot be PF_DONTCARE
pixels pixel buffer used to initialize the new image
Returns:
newly created blank image

Definition at line 430 of file corona.h.

References corona::hidden::format, corona::hidden::height, PixelFormat, and corona::hidden::pixels.

Image* CreateImage int    width,
int    height,
PixelFormat    format,
int    palette_size,
PixelFormat    palette_format
[inline]
 

Create a new, blank image with a specified width, height, format, and palette.

Parameters:
width width of image
height height of image
format format of palette indices, should be PF_I8
palette_size number of colors in palette
palette_format pixel format of palette entries

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.

Image* CloneImage Image   source,
PixelFormat    format = PF_DONTCARE
[inline]
 

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.

Parameters:
source image to clone
format format the new image is stored in, defaults to PF_DONTCARE
Returns:
new image cloned from the source, 0 if failure

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().

Image* OpenImage const char *    filename,
PixelFormat    pixel_format = PF_DONTCARE,
FileFormat    file_format = FF_AUTODETECT
[inline]
 

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.

Parameters:
filename image filename to open
file_format file format the image is stored in, or FF_AUTODETECT to try all loaders
pixel_format desired pixel format, or PF_DONTCARE to use image's native format
Returns:
the image loaded from the disk, or 0 if it cannot be opened

Definition at line 496 of file corona.h.

References FF_AUTODETECT, corona::hidden::file_format, FileFormat, PF_DONTCARE, and PixelFormat.

Referenced by OpenImage().

Image* OpenImage File   file,
PixelFormat    pixel_format = PF_DONTCARE,
FileFormat    file_format = FF_AUTODETECT
[inline]
 

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.

Parameters:
file name of the file that contains the image
file_format file format the image is stored in, or FF_AUTODETECT to try all loaders
pixel_format desired pixel format, or PF_DONTCARE to use image's native format
Returns:
the image loaded from the file, or 0 if it cannot be opened

Definition at line 526 of file corona.h.

References FF_AUTODETECT, corona::hidden::file_format, FileFormat, PF_DONTCARE, and PixelFormat.

Image* OpenImage const char *    filename,
FileFormat    file_format,
PixelFormat    pixel_format = PF_DONTCARE
[inline]
 

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.

Image* OpenImage File   file,
FileFormat    file_format,
PixelFormat    pixel_format = PF_DONTCARE
[inline]
 

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.

bool SaveImage const char *    filename,
FileFormat    file_format,
Image   image
[inline]
 

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.

Parameters:
filename name of the file to save the image to
file_format file format in which to save image. if FF_AUTODETECT, SaveImage guesses the type from the file extension
image image to save
Returns:
true if save succeeds, false otherwise

Definition at line 568 of file corona.h.

References corona::hidden::file_format, FileFormat, and corona::hidden::image.

bool SaveImage File   file,
FileFormat    file_format,
Image   image
[inline]
 

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.

Note:
This function may create the file even if the save does not succeed, so users of this library should remove the file after the call to SaveImage().
Parameters:
file file in which to save the image
file_format file format in which to save image -- must not be FF_AUTODETECT
image image to save
Returns:
true if the save succeeds, false otherwise

Definition at line 593 of file corona.h.

References corona::hidden::file_format, FileFormat, and corona::hidden::image.

Image* ConvertImage Image   source,
PixelFormat    format
[inline]
 

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.

Parameters:
source image to convert
format desired format -- can be PF_DONTCARE
Returns:
valid image object if conversion succeeds, 0 otherwise

Definition at line 615 of file corona.h.

References corona::hidden::format, and PixelFormat.

Referenced by APITests::testMemory().

Image* ConvertPalette Image   source,
PixelFormat    palette_format
[inline]
 

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.

Parameters:
source palettized image to convert
palette_format desired pixel format of palette
Returns:
valid image object if conversion succeeds, 0 otherwise

Definition at line 633 of file corona.h.

References corona::hidden::palette_format, and PixelFormat.

Referenced by PaletteTests::testAPI(), and APITests::testMemory().

Image* FlipImage Image   source,
int    coordinate_axis
[inline]
 

Flips the pixels in the image around the given axis.

Parameters:
source image to flip
coordinate_axis Axis around which to flip. Both CA_X and CA_Y can be specified by ORing them together.
Returns:
the image passed in

Definition at line 646 of file corona.h.

References corona::hidden::coordinate_axis.

Referenced by APITests::testBasicOperations(), and APITests::testMemory().

File* OpenFile const char *    filename,
bool    writeable
[inline]
 

Returns a default File implementation.

Parameters:
filename name of the file on local filesystem
writeable whether the file can be written to

Definition at line 656 of file corona.h.

References corona::hidden::writeable.

File* CreateMemoryFile const void *    buffer,
int    size
[inline]
 

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.

Parameters:
buffer Pointer to the beginning of the data.
size Size of the buffer in bytes.
Returns:
0 if size is non-zero and buffer is null. Otherwise, returns a valid File object.

Definition at line 673 of file corona.h.

References corona::hidden::size.

Referenced by FileTests::testMemoryFiles(), and FileTests::testMemoryLoads().

int GetPixelSize PixelFormat    format [inline]
 

Returns the number of bytes needed to store a pixel of a gixen format.

Parameters:
format The format to query.
Returns:
Number of bytes each pixel takes, or 0 if the format is invalid.

Definition at line 684 of file corona.h.

References corona::hidden::format, and PixelFormat.

Referenced by ImageTestCase::AssertImagesEqual(), ConvertPixels(), DirectConversion(), ExpandPalette(), and APITests::testFormatQueries().

bool IsDirect PixelFormat    format [inline]
 

Returns true if the pixel format does not require a palette; that is, if each pixel itself contains color data.

Parameters:
format The format to query.
Returns:
True if format is direct color, false otherwise.

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().

bool IsPalettized PixelFormat    format [inline]
 

Returns true if the pixel format requires a palette; that is, if each pixel is an index into a separate palette.

Parameters:
format The format to query.
Returns:
True if format is palettized, false otherwise.

Definition at line 709 of file corona.h.

References corona::hidden::format, PF_I8, and PixelFormat.

Referenced by APITests::testFormatQueries().

int GetPaletteSize PixelFormat    format [inline]
 

Returns the number of color entries in a palette for an image of the given format.

Parameters:
format The format to query.
Returns:
Number of color entries, or 0 if the format is not palettized.

Definition at line 721 of file corona.h.

References corona::hidden::format, PF_I8, and PixelFormat.

Referenced by APITests::testFormatQueries().

corona::COR_EXPORT File   const
 

Image * corona::OpenBMP File   file
 

Definition at line 46 of file OpenBMP.cpp.

References DecodeBitmap(), ReadHeader(), ReadInfoHeader(), and ReadPalette().

Image * corona::OpenJPEG File   file
 

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.

Image * corona::OpenPCX File   file
 

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().

Image * corona::OpenPNG File   file
 

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().

Image * corona::OpenTGA File   file
 

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().

Image * corona::OpenGIF File   file
 

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().

bool corona::ReadHeader File   file,
Header   h
 

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().

bool corona::ReadInfoHeader File   file,
Header   h
 

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().

bool corona::ReadPalette File   file,
Header   h
 

Definition at line 176 of file OpenBMP.cpp.

References corona::Header::bf_blue_mask, corona::Header::bf_blue_rshift, corona::Header::bf_blue_shift, corona::Header::bf_green_mask, corona::Header::bf_green_rshift, corona::Header::bf_green_shift, corona::Header::bf_red_mask, corona::Header::bf_red_rshift, corona::Header::bf_red_shift, corona::BGR::blue, corona::Header::bpp, corona::Header::compression, count_ones(), count_right_zeroes(), corona::BGR::green, corona::Header::os2, corona::Header::palette, corona::Header::palette_size, corona::File::read(), read32_le(), and corona::BGR::red.

Referenced by OpenBMP().

Image * corona::DecodeBitmap File   file,
const Header   h
 

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().

int count_right_zeroes u32    n
 

Definition at line 152 of file OpenBMP.cpp.

References u32.

Referenced by ReadPalette().

int count_ones u32    n
 

Definition at line 164 of file OpenBMP.cpp.

References u32.

Referenced by ReadPalette().

bool advance int &    x,
int &    y,
const Header   h
 

Definition at line 268 of file OpenBMP.cpp.

References corona::Header::height, and corona::Header::width.

Referenced by ReadBitmapRLE4(), and ReadBitmapRLE8().

Image* ReadBitmap1 const byte   raster_data,
const Header   h
 

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().

Image* ReadBitmap4 const byte   raster_data,
const Header   h
 

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().

Image* ReadBitmapRLE4 const byte   raster_data,
const Header   h
 

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().

Image* ReadBitmap8 const byte   raster_data,
const Header   h
 

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().

Image* ReadBitmapRLE8 const byte   raster_data,
const Header   h
 

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().

Image* ReadBitmap16 const byte   raster_data,
const Header   h
 

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().

Image* ReadBitmap24 const byte   raster_data,
const Header   h
 

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().

Image* ReadBitmap32 const byte   raster_data,
const Header   h
 

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().

int InputFunc GifFileType *    gif,
GifByteType *    bytes,
int    size
 

Definition at line 13 of file OpenGIF.cpp.

References corona::File::read(), and corona::hidden::size.

Referenced by OpenGIF().

void corona::JPEG_init_source j_decompress_ptr    cinfo
 

Definition at line 131 of file OpenJPEG.cpp.

Referenced by OpenJPEG().

boolean corona::JPEG_fill_input_buffer j_decompress_ptr    cinfo
 

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().

void corona::JPEG_skip_input_data j_decompress_ptr    cinfo,
long    num_bytes
 

Definition at line 157 of file OpenJPEG.cpp.

References JPEG_fill_input_buffer().

Referenced by OpenJPEG().

void corona::JPEG_term_source j_decompress_ptr    cinfo
 

Definition at line 171 of file OpenJPEG.cpp.

Referenced by OpenJPEG().

void corona::JPEG_error_exit j_common_ptr    cinfo
 

Definition at line 177 of file OpenJPEG.cpp.

References corona::InternalStruct::error_mgr.

Referenced by OpenJPEG().

void corona::JPEG_emit_message j_common_ptr    cinfo,
int    msg_level
 

Definition at line 184 of file OpenJPEG.cpp.

bool ReadScanline File   file,
int    scansize,
byte   scanline
 

Definition at line 36 of file OpenPCX.cpp.

References corona::File::read().

Referenced by OpenPCX().

void PNG_read_function png_structp    png_ptr,
png_bytep    data,
png_size_t    length
 

Definition at line 21 of file OpenPNG.cpp.

References corona::File::read().

Referenced by OpenPNG().

void PNG_warning_function png_structp    png_ptr,
png_const_charp    error
 

Definition at line 32 of file OpenPNG.cpp.

Referenced by OpenPNG().

void PNG_error_function png_structp    png_ptr,
png_const_charp    warning
 

Definition at line 38 of file OpenPNG.cpp.

Referenced by OpenPNG().

void fill_palette png_structp    png,
png_infop    info,
png_color    palette[256]
 

Definition at line 47 of file OpenPNG.cpp.

References COR_GUARD, COR_IF_DEBUG, and COR_LOG.

Referenced by OpenPNG().

bool corona::SavePNG File   file,
Image   image
 

Definition at line 20 of file SavePNG.cpp.

References CloneImage(), COR_GUARD, COR_LOG, corona::Image::getFormat(), corona::Image::getHeight(), corona::Image::getPalette(), corona::Image::getPaletteFormat(), corona::Image::getPaletteSize(), corona::Image::getPixels(), corona::Image::getWidth(), corona::hidden::height, corona::hidden::image, PF_I8, PF_R8G8B8, PF_R8G8B8A8, corona::hidden::pixels, PNG_flush(), and PNG_write().

bool corona::SaveTGA File   file,
Image   image
 

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().

void PNG_write png_structp    png_ptr,
png_bytep    data,
png_size_t    length
 

Definition at line 9 of file SavePNG.cpp.

References corona::File::write().

Referenced by SavePNG().

void PNG_flush png_structp    png_ptr
 

Definition at line 16 of file SavePNG.cpp.

Referenced by SavePNG().

u16 read16_le const byte   b [inline]
 

Definition at line 70 of file Utility.h.

References u16.

Referenced by OpenPCX(), OpenTGA(), read32_le(), ReadBitmap16(), and ReadInfoHeader().

void write16_le byte   b,
u16    value
[inline]
 

Definition at line 74 of file Utility.h.

References u16.

Referenced by SaveTGA().

u16 read16_be const byte   b [inline]
 

Definition at line 79 of file Utility.h.

References u16.

Referenced by read32_be().

void write16_be byte   b,
u16    value
[inline]
 

Definition at line 83 of file Utility.h.

References u16.

u32 read32_le const byte   b [inline]
 

Definition at line 88 of file Utility.h.

References read16_le(), and u32.

Referenced by ReadBitmap32(), ReadHeader(), ReadInfoHeader(), and ReadPalette().

u32 read32_be const byte   b [inline]
 

Definition at line 92 of file Utility.h.

References read16_be(), and u32.


Generated on Thu Oct 2 13:00:10 2003 for corona by doxygen1.3-rc1