FLTK 1.3.2
Fl_PNG_Image Class Reference

The Fl_PNG_Image class supports loading, caching, and drawing of Portable Network Graphics (PNG) image files. More...

#include <Fl_PNG_Image.H>

Inheritance diagram for Fl_PNG_Image:
Fl_RGB_Image Fl_Image

List of all members.

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.

Detailed Description

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.


Constructor & Destructor Documentation

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.

Parameters:
[in]filenameName 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.

Parameters:
name_pngA name given to this image or NULL
bufferPointer to the start of the PNG image in memory
maxsizeSize in bytes of the memory buffer containing the PNG image

The documentation for this class was generated from the following files: