Reads and writes LBM files. More...
Public Member Functions | |
FileLBM () | |
Default constructor. | |
Image * | Load (InputMemoryStream *pInput) |
Parses a LBM file. | |
const RGBAWord8_t * | GetPalette (void) const |
Get the file image's palette. | |
RGBAWord8_t * | GetPalette (void) |
Get the file image's palette. | |
void | SetPalette (const RGBWord8_t *pInput, uint_t uStartIndex=0, uint_t uPaletteSize=256) |
Set the file image's palette (RGB) | |
void | SetPalette (const RGBAWord8_t *pInput, uint_t uStartIndex=0, uint_t uPaletteSize=256) |
Set the file image's palette (RGBA) | |
Static Public Member Functions | |
static const char * | UnpackILBMData (uint8_t *pOutput, uintptr_t uOutputLength, InputMemoryStream *pInput) |
Unpack data using ILBM compression. | |
static const char * | UnpackILBM (uint8_t *pOutput, uint_t uWidth, uint_t uHeight, uint_t uDepth, InputMemoryStream *pInput) |
Unpack bit planed data. | |
static const char * | SeekIffChunk (InputMemoryStream *pInput, uint32_t uID, uintptr_t uStartOffset) |
Scan an AIFF file in memory and return pointer to a chunk. | |
Static Public Attributes | |
static const uint32_t | FILETYPE = 0x494C424D |
'ILBM' Mac File type for LBM files (Byte swapped on little endian machines) | |
static const uint32_t | AUXTYPE = 0x6F676C65 |
'ogle' Mac creator code for LBM files (Byte swapped on little endian machines) | |
Private Attributes | |
RGBAWord8_t | m_Palette [256] |
Palette found in the image. | |
Reads and writes LBM files.
This class will read and write out LBM files and use Burger::Image class instances as data transporters
Burger::FileLBM::FileLBM | ( | ) |
Default constructor.
Initializes all extra file data to defaults
|
inline |
Get the file image's palette.
Obtain a pointer to the 256 entry RGBA color palette found in the LBM file
|
inline |
Get the file image's palette.
Obtain a constant pointer to the 256 entry RGBA color palette found in the LBM file
Burger::Image * Burger::FileLBM::Load | ( | InputMemoryStream * | pInput | ) |
Parses a LBM file.
Read in a LBM file and set the extra variables
Will parse 24 bit uncompressed and 8 bit compressed and uncompressed LBM files only. Other formats are not supported
pInput | Pointer to a memory stream that has a LBM file image |
|
static |
Scan an AIFF file in memory and return pointer to a chunk.
pInput | Data stream to read compressed data from |
uID | IFF token to scan for |
uStartOffset | Offset into the stream where the IFF file begins |
|
inline |
Set the file image's palette (RGBA)
Given a pointer to a palette, copy the colors into this class for writing to an 8 bit LBM file.
If the starting index is greater than 255, this function does nothing. If the color entry count exceeds 256 colors, the remaining colors are ignored to prevent buffer overruns
pInput | Pointer to the palette to copy |
uStartIndex | Color index of the 256 color internal palette to start modification |
uPaletteSize | Number of color entries in the palette (Maximum 256) |
|
inline |
Set the file image's palette (RGB)
Given a pointer to a palette, copy the colors into this class for writing to an 8 bit LBM file. Since the Alpha is missing from the input, each entry set will have the alpha set to zero.
If the starting index is greater than 255, this function does nothing. If the color entry count exceeds 256 colors, the remaining colors are ignored to prevent buffer overruns
pInput | Pointer to the palette to copy |
uStartIndex | Color index of the 256 color internal palette to start modification |
uPaletteSize | Number of color entries in the palette (Maximum 256) |
|
static |
Unpack bit planed data.
Supports 8 and 24 bit data
pOutput | Buffer to accept the decompressed data |
uWidth | Width of the image in pixels |
uHeight | Height of the image in pixels |
uDepth | Depth of the image in bits |
pInput | Data stream to read compressed data from |
|
static |
Unpack data using ILBM compression.
pOutput | Buffer to accept the decompressed data |
uOutputLength | Length of the buffer for decompressed data |
pInput | Data stream to read compressed data from |
|
static |
'ogle' Mac creator code for LBM files (Byte swapped on little endian machines)
|
static |
'ILBM' Mac File type for LBM files (Byte swapped on little endian machines)
|
private |
Palette found in the image.