Public Member Functions | |
unsigned char * | pixels (unsigned char *setPixels=NULL) |
unsigned int | width (unsigned int setWidth=0) |
unsigned int | height (unsigned int setHeight=0) |
unsigned char | colorType (unsigned char setColorType=255) |
rgb * | palette (rgb *setPalette=NULL) |
unsigned char * | transparency (unsigned char *setTransparency=NULL) |
int | paletteSize (int setPaletteSize=0) |
int | transparencySize (int setTransparencySize=0) |
unsigned int | delayNum (unsigned int setDelayNum=0) |
unsigned int | delayDen (unsigned int setDelayDen=0) |
unsigned char ** | rows (unsigned char **setRows=NULL) |
APNGFrame () | |
Creates an empty APNGFrame. | |
APNGFrame (const std::string &filePath, unsigned delayNum=DEFAULT_FRAME_NUMERATOR, unsigned delayDen=DEFAULT_FRAME_DENOMINATOR) | |
Creates an APNGFrame from a PNG file. More... | |
APNGFrame (rgb *pixels, unsigned int width, unsigned int height, unsigned delayNum=DEFAULT_FRAME_NUMERATOR, unsigned delayDen=DEFAULT_FRAME_DENOMINATOR) | |
Creates an APNGFrame from a bitmapped array of RBG pixel data. More... | |
APNGFrame (rgb *pixels, unsigned int width, unsigned int height, rgb *trns_color=NULL, unsigned delayNum=DEFAULT_FRAME_NUMERATOR, unsigned delayDen=DEFAULT_FRAME_DENOMINATOR) | |
Creates an APNGFrame from a bitmapped array of RBG pixel data. More... | |
APNGFrame (rgba *pixels, unsigned int width, unsigned int height, unsigned delayNum=DEFAULT_FRAME_NUMERATOR, unsigned delayDen=DEFAULT_FRAME_DENOMINATOR) | |
Creates an APNGFrame from a bitmapped array of RBGA pixel data. More... | |
bool | save (const std::string &outPath) const |
Saves this frame as a single PNG file. More... | |
Public Attributes | |
unsigned char * | _pixels |
unsigned int | _width |
unsigned int | _height |
unsigned char | _colorType |
rgb | _palette [256] |
unsigned char | _transparency [256] |
int | _paletteSize |
int | _transparencySize |
unsigned int | _delayNum |
unsigned int | _delayDen |
unsigned char ** | _rows |
apngasm::APNGFrame::APNGFrame | ( | const std::string & | filePath, |
unsigned | delayNum = DEFAULT_FRAME_NUMERATOR , |
||
unsigned | delayDen = DEFAULT_FRAME_DENOMINATOR |
||
) |
Creates an APNGFrame from a PNG file.
filePath | The relative or absolute path to an image file. |
delayNum | The delay numerator for this frame (defaults to DEFAULT_FRAME_NUMERATOR). |
delayDen | The delay denominator for this frame (defaults to DEFAULT_FRAME_DENMINATOR). |
apngasm::APNGFrame::APNGFrame | ( | rgb * | pixels, |
unsigned int | width, | ||
unsigned int | height, | ||
unsigned | delayNum = DEFAULT_FRAME_NUMERATOR , |
||
unsigned | delayDen = DEFAULT_FRAME_DENOMINATOR |
||
) |
Creates an APNGFrame from a bitmapped array of RBG pixel data.
pixels | The RGB pixel data. |
width | The width of the pixel data. |
height | The height of the pixel data. |
delayNum | The delay numerator for this frame (defaults to DEFAULT_FRAME_NUMERATOR). |
delayDen | The delay denominator for this frame (defaults to DEFAULT_FRAME_DENMINATOR). |
apngasm::APNGFrame::APNGFrame | ( | rgb * | pixels, |
unsigned int | width, | ||
unsigned int | height, | ||
rgb * | trns_color = NULL , |
||
unsigned | delayNum = DEFAULT_FRAME_NUMERATOR , |
||
unsigned | delayDen = DEFAULT_FRAME_DENOMINATOR |
||
) |
Creates an APNGFrame from a bitmapped array of RBG pixel data.
pixels | The RGB pixel data. |
width | The width of the pixel data. |
height | The height of the pixel data. |
trns_color | An array of transparency data. |
delayNum | The delay numerator for this frame (defaults to DEFAULT_FRAME_NUMERATOR). |
delayDen | The delay denominator for this frame (defaults to DEFAULT_FRAME_DENMINATOR). |
apngasm::APNGFrame::APNGFrame | ( | rgba * | pixels, |
unsigned int | width, | ||
unsigned int | height, | ||
unsigned | delayNum = DEFAULT_FRAME_NUMERATOR , |
||
unsigned | delayDen = DEFAULT_FRAME_DENOMINATOR |
||
) |
Creates an APNGFrame from a bitmapped array of RBGA pixel data.
pixels | The RGBA pixel data. |
width | The width of the pixel data. |
height | The height of the pixel data. |
delayNum | The delay numerator for this frame (defaults to DEFAULT_FRAME_NUMERATOR). |
delayDen | The delay denominator for this frame (defaults to DEFAULT_FRAME_DENMINATOR). |
bool apngasm::APNGFrame::save | ( | const std::string & | outPath | ) | const |
Saves this frame as a single PNG file.
outPath | The relative or absolute path to save the image file to. |