FLTK 1.3.0
|
The Fl_PNG_Image class supports loading, caching, and drawing of Portable Network Graphics (PNG) image files. More...
#include <Fl_PNG_Image.H>
Public Member Functions | |
Fl_PNG_Image (const char *filename) | |
The constructor loads the named PNG image from the given png filename. | |
Fl_PNG_Image (const char *name_png, const unsigned char *buffer, int datasize) | |
Constructor that reads a PNG image from memory. |
The Fl_PNG_Image class supports loading, caching, and drawing of Portable Network Graphics (PNG) image files.
The class loads colormapped and full-color images and handles color- and alpha-based transparency.
Fl_PNG_Image::Fl_PNG_Image | ( | const char * | filename | ) |
The constructor loads the named PNG image from the given png filename.
The destructor frees all memory and server resources that are used by the image.
[in] | filename | Name of PNG file to read |
Fl_PNG_Image::Fl_PNG_Image | ( | const char * | name_png, |
const unsigned char * | buffer, | ||
int | maxsize | ||
) |
Constructor that reads a PNG image from memory.
Construct an image from a block of memory inside the application. Fluid offers "binary Data" chunks as a great way to add image data into the C++ source code. name_png can be NULL. If a name is given, the image is added to the list of shared images (see: Fl_Shared_Image) and will be available by that name.
name_png | A name given to this image or NULL |
buffer | Pointer to the start of the PNG image in memory |
maxsize | Size in bytes of the memory buffer containing the PNG image |