Abstract base class for all image codecs.
More...
#include <Image.hpp>
|
static MagicString | toMagic (std::string const &s) |
| Convenience function to convert a string literal to a magic string. More...
|
|
Abstract base class for all image codecs.
Definition at line 228 of file Image.hpp.
The type of the codec's magic string (an array of MAGIC_LENGTH bytes).
Definition at line 42 of file Codec.hpp.
Get the magic string for the codec, if it has one (else a string of all zeros).
Reimplemented in CodecJpeg.
Definition at line 127 of file Codec.hpp.
virtual char const* getName |
( |
| ) |
const |
|
pure virtualinherited |
Implicitly convert to an integer value for use in switch statements etc.
This value will be common to all instances of the codec class
Definition at line 136 of file Codec.hpp.
bool operator== |
( |
Codec const & |
other | ) |
const |
|
inherited |
Check if two codecs are equal.
All instances of a codec class must be considered equal.
Definition at line 130 of file Codec.hpp.
Read an image from a binary input stream.
If read_block_header is true, extra information about the image block (such as its size and type) will be read first from the input stream. Else, the entire input will be treated as the image block (the size() function of the stream must return the correct value in this case).
- See also
- writeImage
Implemented in CodecJpeg.
int8 setName |
( |
char const * |
s | ) |
|
|
virtualinherited |
Set the name of the object.
- Returns
- True if the name was successfully set, else false (e.g. if the name is read-only).
Implements INamedObject.
Definition at line 124 of file Codec.hpp.
Convenience function to convert a string literal to a magic string.
Definition at line 139 of file Codec.hpp.
Write an image to a binary output stream.
Optionally prefixes extra information about the image block such as its size and type (which may have not been specified in the encoding format itself).
- See also
- readImage
Implemented in CodecJpeg.
intx const MAGIC_LENGTH = 8 |
|
staticinherited |
The standard length (in bytes) of the codec's magic string as used in BlockHeader.
Definition at line 39 of file Codec.hpp.
The documentation for this class was generated from the following file: