The base class for different image codecs. More...
#include <Luminous/ImageCodec.hpp>
Public Member Functions | |
| virtual bool | canRead (QFile &file)=0 |
| Can this codec read the given file? The method should examine the file contents and return true if this codec can read it. More... | |
| virtual QString | extensions () const =0 |
| Get the extensions associated with this codec in a string separated by spaces. More... | |
| virtual QString | name () const =0 |
| Return name of the codec. More... | |
| virtual bool | ping (ImageInfo &info, QFile &file)=0 |
| Pinging an image just reads the width, height, and pixel format from a file. More... | |
| virtual bool | read (Image &image, QFile &file)=0 |
| Read the image data from the given file. More... | |
| virtual bool | read (CompressedImage &image, QFile &file, int level=0) |
| Read compressed image data from the given file. More... | |
| virtual bool | write (const Image &image, QFile &file)=0 |
| Store the given Image into a file. More... | |
The base class for different image codecs.
Derive your own codec from this and override the three methods.
|
pure virtual |
Can this codec read the given file? The method should examine the file contents and return true if this codec can read it.
The function must not change the current position in the file.
| file | file to examine |
Implemented in Luminous::ImageCodecDDS.
|
pure virtual |
Get the extensions associated with this codec in a string separated by spaces.
Implemented in Luminous::ImageCodecDDS.
|
pure virtual |
|
pure virtual |
Pinging an image just reads the width, height, and pixel format from a file.
| info | ImageInfo struct to store the read info to |
| file | file to read from |
Implemented in Luminous::ImageCodecDDS.
|
pure virtual |
Read the image data from the given file.
| image | Image to store the data into |
| file | file to read the data from |
Implemented in Luminous::ImageCodecDDS.
|
inlinevirtual |
Read compressed image data from the given file.
| image | image to read to |
| file | file to read from |
| level | mipmap level to read |
Reimplemented in Luminous::ImageCodecDDS.
|
pure virtual |
Store the given Image into a file.
| image | Image to store |
| file | file to write to |
Implemented in Luminous::ImageCodecDDS.