Utility encoder using all other encoders within nkImages to parse arbitrary data. More...
Static Public Member Functions | |
static bool | canDecode (nkMemory::BufferView< unsigned char > data) |
static Image | decode (nkMemory::BufferView< unsigned char > data, const AlignmentDescriptor &alignmentDescriptor=AlignmentDescriptor()) |
Utility encoder using all other encoders within nkImages to parse arbitrary data.
This encoder's job is to delegate decoding to other encoders defined in the component. This means that for a given binary buffer, it will sequentially test it against all other encoders to select one that can decode the data into an image.
Cost is about looping into an array recording all encoders and calling their canDecode() method to know if data is compatible before calling the right decoding method.
|
static |
Checks whether the data provided can be decoded by one of the encoders available.
data | The binary data to decode. |
|
static |
Decodes a binary buffer into an image representation, by first finding which encoder is compatible with the data.
data | The data to decode. |
alignmentDescriptor | The memory alignment constraints, if any. |