The Fl_JPEG_Image class supports loading, caching, and drawing of Joint Photographic Experts Group (JPEG) File Interchange Format (JFIF) images. More...
#include <Fl_JPEG_Image.H>
Public Member Functions | |
Fl_JPEG_Image (const char *name, const unsigned char *data) | |
The constructor loads the JPEG image from memory. | |
Fl_JPEG_Image (const char *filename) | |
The constructor loads the JPEG image from the given jpeg filename. |
The Fl_JPEG_Image class supports loading, caching, and drawing of Joint Photographic Experts Group (JPEG) File Interchange Format (JFIF) images.
The class supports grayscale and color (RGB) JPEG image files.
Fl_JPEG_Image::Fl_JPEG_Image | ( | const char * | filename | ) |
The constructor loads the JPEG image from the given jpeg filename.
The inherited destructor frees all memory and server resources that are used by the image.
Use Fl_Image::fail() to check if Fl_JPEG_Image failed to load. fail() returns ERR_FILE_ACCESS if the file could not be opened or read, ERR_FORMAT if the JPEG format could not be decoded, and ERR_NO_IMAGE if the image could not be loaded for another reason. If the image has loaded correctly, w(), h(), and d() should return values greater than zero.
[in] | filename | a full path and name pointing to a valid jpeg file. |
Fl_JPEG_Image::Fl_JPEG_Image | ( | const char * | name, | |
const unsigned char * | data | |||
) |
The constructor loads the JPEG 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.
The inherited destructor frees all memory and server resources that are used by the image.
Use Fl_Image::fail() to check if Fl_JPEG_Image failed to load. fail() returns ERR_FILE_ACCESS if the file could not be opened or read, ERR_FORMAT if the JPEG format could not be decoded, and ERR_NO_IMAGE if the image could not be loaded for another reason. If the image has loaded correctly, w(), h(), and d() should return values greater than zero.
name | A unique name or NULL | |
data | A pointer to the memory location of the JPEG image |