Main Page   Modules   Class Hierarchy   Alphabetical List   Compound List   File List   Compound Members   File Members  

Fl_Image_IO_Struct Struct Reference

Fl_Image IO struct. More...

#include <Fl_Image_IO.h>

List of all members.

Public Attributes

char * name
 Name of image type, e.g. More...

char * extensions
 Supported file extension, separated by semicolon. More...

bool(* is_valid_file )(const char *filename)
 Check if filename has valid extension and/or contains valid image data. More...

bool(* is_valid_mem )(const uint8 *data, uint32 size)
 Check if 'data' is valid image data. More...

bool(* read_file )(const char *filename, int quality, uint8 *&data, Fl_PixelFormat &data_format, int &w, int &h)
 Read and uncompress image from file. More...

bool(* read_mem )(const uint8 *stream, uint32 size, int quality, uint8 *&data, Fl_PixelFormat &data_format, int &w, int &h)
 Read and uncompress image from data. More...

bool(* write_mem )(uint8 *&stream, int &size, int quality, const uint8 *data, const Fl_PixelFormat &data_format, int w, int h)
 Write and/or compress image data to memory. More...

bool(* write_file )(const char *filename, int quality, const uint8 *data, const Fl_PixelFormat &data_format, int w, int h)
 Write and/or compress image data to memory. More...


Detailed Description

Fl_Image IO struct.

Support for eFLTK basic image read/write operations. Features of IO can be obtained by checking if function of this struct is not NULL. For example, if IO supports only reading, are write methods NULL.

Fl_Image_IO functions are NOT allowed to throw any exceptions that it doesn't handle it self!

Currently only PNG supports writing.

Definition at line 31 of file Fl_Image_IO.h.


Member Data Documentation

char* Fl_Image_IO_Struct::extensions
 

Supported file extension, separated by semicolon.

e.g. "jpeg;jpg"

Definition at line 44 of file Fl_Image_IO.h.

bool(* Fl_Image_IO_Struct::is_valid_file)(const char *filename)
 

Check if filename has valid extension and/or contains valid image data.

Returns true if success.

Parameters:
filename  Absolute path to file.

bool(* Fl_Image_IO_Struct::is_valid_mem)(const uint8 *data, uint32 size)
 

Check if 'data' is valid image data.

Returns true if success.

Parameters:
data  Pointer to data in memory.
size  Size of data.

char* Fl_Image_IO_Struct::name
 

Name of image type, e.g.

"JPEG" or "PNG"

Definition at line 38 of file Fl_Image_IO.h.

bool(* Fl_Image_IO_Struct::read_file)(const char *filename, int quality, uint8 *&data, Fl_PixelFormat &data_format, int &w, int &h)
 

Read and uncompress image from file.

Returns true if success.

Parameters:
filename  Absolute path to filename to write.
quality  Quality for uncompress engine, not all image types supports this.
data  Uncompressed image data is stored to this.
format  Format of image data is stored to this. Caller MUST free data using "free()" function.
w  Width of readed image is stored to this.
h  Height of readed image is stored to this.

bool(* Fl_Image_IO_Struct::read_mem)(const uint8 *stream, uint32 size, int quality, uint8 *&data, Fl_PixelFormat &data_format, int &w, int &h)
 

Read and uncompress image from data.

Returns true if success.

Parameters:
stream  Pointer to data to read in memory.
size  Size of data in bytes.
quality  Quality for uncompress engine, not all image types supports this.
data  Uncompressed image data is stored to this.
format  Format of image data is stored to this. Caller MUST free data using "free()" function.
w  Width of readed image is stored to this.
h  Height of readed image is stored to this.

bool(* Fl_Image_IO_Struct::write_file)(const char *filename, int quality, const uint8 *data, const Fl_PixelFormat &data_format, int w, int h)
 

Write and/or compress image data to memory.

Returns true if success.

Parameters:
filename  Absolute path to filename to write.
quality  Preffered saving quality, not all image types supports this.
data  Uncompressed image data.
format  Format of uncompressed image data.
w  Width of uncompressed image.
h  Height of uncompressed image.

bool(* Fl_Image_IO_Struct::write_mem)(uint8 *&stream, int &size, int quality, const uint8 *data, const Fl_PixelFormat &data_format, int w, int h)
 

Write and/or compress image data to memory.

Returns true if success.

Parameters:
stream  Compressed data is stored to this. Caller MUST free data with "free()" function.
size  Size of data.
quality  Preffered saving quality, not all image types supports this.
data  Uncompressed image data.
format  Format of uncompressed image data.
w  Width of uncompressed image.
h  Height of uncompressed image.


The documentation for this struct was generated from the following file:
Generated on Thu Jul 31 15:33:48 2003 for eFLTK by doxygen1.2.15