#include <image.hpp>
Static Public Member Functions | |
Manipulators | |
static void | registerImage (Image::Type type, NewInstanceFct newInst, IsThisTypeFct isType) |
Register image type together with its function pointers. | |
Accessors | |
static Image::AutoPtr | open (const std::string &path) |
Create an Image subclass of the appropriate type by reading the specified file. Image type is derived from the file contents. | |
static Image::AutoPtr | open (const byte *data, long size) |
Create an Image subclass of the appropriate type by reading the provided memory. Image type is derived from the memory contents. | |
static Image::AutoPtr | open (BasicIo::AutoPtr io) |
Create an Image subclass of the appropriate type by reading the provided BasicIo instance. Image type is derived from the data provided by io. The passed in io instance is (re)opened by this method. | |
static Image::AutoPtr | create (Image::Type type, const std::string &path) |
Create an Image subclass of the requested type by creating a new image file. If the file already exists, it will be overwritten. | |
static Image::AutoPtr | create (Image::Type type) |
Create an Image subclass of the requested type by creating a new image in memory. | |
static Image::AutoPtr | create (Image::Type type, BasicIo::AutoPtr io) |
Create an Image subclass of the requested type by writing a new image to a BasicIo instance. If the BasicIo instance already contains data, it will be overwritten. | |
static Image::Type | getType (const std::string &path) |
Returns the image type of the provided file. | |
static Image::Type | getType (const byte *data, long size) |
Returns the image type of the provided data buffer. | |
static Image::Type | getType (BasicIo &io) |
Returns the image type of data provided by a BasicIo instance. The passed in io instance is (re)opened by this method. | |
Classes | |
struct | ImageFcts |
Struct for storing image function pointers. |
The factory is implemented as a singleton, which can be accessed through static member functions.
|
Create an Image subclass of the requested type by writing a new image to a BasicIo instance. If the BasicIo instance already contains data, it will be overwritten.
|
|
Create an Image subclass of the requested type by creating a new image in memory.
|
|
Create an Image subclass of the requested type by creating a new image file. If the file already exists, it will be overwritten.
|
|
Returns the image type of data provided by a BasicIo instance. The passed in io instance is (re)opened by this method.
|
|
Returns the image type of the provided data buffer.
|
|
Returns the image type of the provided file.
|
|
Create an Image subclass of the appropriate type by reading the provided BasicIo instance. Image type is derived from the data provided by io. The passed in io instance is (re)opened by this method.
|
|
Create an Image subclass of the appropriate type by reading the provided memory. Image type is derived from the memory contents.
|
|
Create an Image subclass of the appropriate type by reading the specified file. Image type is derived from the file contents.
|
|
Register image type together with its function pointers. The image factory creates new images by calling their associated function pointer. Additional images can be added by registering new type and function pointers. If called for a type that already exists in the list, the corresponding functions are replaced.
|