Reads files. More...
Public Member Functions | |
FileAPF () | |
Default constructor. | |
Image * | Load (InputMemoryStream *pInput) |
Parses an Apple Preferred File (Apple IIgs) | |
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 Attributes | |
static const uint32_t | FILETYPE = 0x41504620 |
'APF ' Mac File type for APF files (Byte swapped on little endian machines) | |
static const uint32_t | AUXTYPE = 0x6F676C65 |
'ogle' Mac creator code for APF files (Byte swapped on little endian machines) | |
Private Attributes | |
RGBAWord8_t | m_Palette [256] |
Palette found in the image. | |
Reads files.
This class will read Apple IIgs Apple Preferred Graphic files and use Burger::Image class instances as data transporters
Burger::FileAPF::FileAPF | ( | ) |
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 APF file
|
inline |
Get the file image's palette.
Obtain a constant pointer to the 256 entry RGBA color palette found in the APF file
Burger::Image * Burger::FileAPF::Load | ( | InputMemoryStream * | pInput | ) |
Parses an Apple Preferred File (Apple IIgs)
Read in an Apple Preferred File made for an Apple IIgs and set the extra variables
Will parse 4 bit compressed files only.
pInput | Pointer to a memory stream that has an APF file image |
|
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 APF 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 APF 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 |
'ogle' Mac creator code for APF files (Byte swapped on little endian machines)
|
static |
'APF ' Mac File type for APF files (Byte swapped on little endian machines)
|
private |
Palette found in the image.