![]() |
Public API Reference |
#include <imageio.h>
Inheritance diagram for iImageIO:
Public Types | |
typedef csImageIOFileFormatDescription | FileFormatDescription |
Description for a file format supported by an image loader. More... | |
Public Methods | |
virtual const csVector & | GetDescription ()=0 |
Propagate the image fileformats handled by this plugin. More... | |
virtual csPtr< iImage > | Load (uint8 *iBuffer, uint32 iSize, int iFormat)=0 |
Load an image from a buffer. More... | |
virtual void | SetDithering (bool iEnable)=0 |
Set global image dithering option. More... | |
virtual csPtr< iDataBuffer > | Save (iImage *image, FileFormatDescription *format, const char *extraoptions=NULL)=0 |
Save an image using a prefered format. More... | |
virtual csPtr< iDataBuffer > | Save (iImage *image, const char *mime=NULL, const char *extraoptions=NULL)=0 |
Save an image using format <mime>. More... |
Definition at line 59 of file imageio.h.
|
Description for a file format supported by an image loader.
|
|
Propagate the image fileformats handled by this plugin.
|
|
Load an image from a buffer.
This routine will read from the buffer buf of length size, try to recognize the type of image contained within, and return an csImageFile of the appropriate type. Returns a pointer to the iImage on success, or NULL on failure. The bits that fit the CS_IMGFMT_MASK mask are mandatory: the image always will be loaded in the appropiate format; the bits outside that mask (i.e. CS_IMGFMT_ALPHA) are optional: if the image does not contain alpha mask, the GetFormat() method of the image will return a value without that bit set. |
|
Save an image using format <mime>. If omitted format selection is left to the plugin. |
|
Save an image using a prefered format.
Examples: |
|
Set global image dithering option.
By default this option is disabled. If you enable it, all images will be dithered both after loading and after mipmapping/scaling. This will affect all truecolor->paletted image conversions. |