This class implements read and write functions for PFM images.
More...
|
static bool | readHeader (const uint8_t *&data, size_t &size, FrameType &frameType, bool &isLittleEndian) |
| Reads the header of a PFM file. More...
|
|
static bool | readValue (const uint8_t *&data, size_t &size, std::string &value) |
| Reads one number value from a given data buffer. More...
|
|
This class implements read and write functions for PFM images.
◆ decodeImage()
static Frame Ocean::Media::Special::ImagePfm::decodeImage |
( |
const void * |
buffer, |
|
|
const size_t |
size |
|
) |
| |
|
static |
Decodes a PFM image from a given binary buffer.
- Parameters
-
buffer | The buffer from which the image will be loaded, must be valid |
size | The size of the given buffer in bytes, with range [1, infinity) |
- Returns
- The frame containing the image information, an invalid frame if the image could not be loaded
◆ encodeImage()
static bool Ocean::Media::Special::ImagePfm::encodeImage |
( |
const Frame & |
frame, |
|
|
std::vector< uint8_t > & |
buffer |
|
) |
| |
|
static |
Encodes a given frame as PFM image to a resulting buffer.
- Parameters
-
frame | The frame to be written, must be valid |
buffer | The resulting buffer storing the binary information of the PFM image |
- Returns
- True, if succeeded
◆ isFrameTypeSupported()
Returns whether a given pixel format together with a given pixel origin is supported natively.
- Parameters
-
pixelFormat | The pixel format to be checked |
pixelOrigin | The pixel origin to be checked |
- Returns
- True, if so; False, if a conversion will be necessary
◆ isPixelFormatSupported()
Returns whether a given pixel format is supported natively.
- Parameters
-
pixelFormat | The pixel format to be checked |
- Returns
- True, if so; False, if a conversion will be necessary
◆ isPixelOriginSupported()
Returns whether a given pixel origin is supported natively.
- Parameters
-
pixelOrigin | The pixel origin to be checked |
- Returns
- True, if so; False, if a conversion will be necessary
◆ readHeader()
static bool Ocean::Media::Special::ImagePfm::readHeader |
( |
const uint8_t *& |
data, |
|
|
size_t & |
size, |
|
|
FrameType & |
frameType, |
|
|
bool & |
isLittleEndian |
|
) |
| |
|
staticprotected |
Reads the header of a PFM file.
- Parameters
-
data | The data buffer, will be moved if the header could be read successfully, must be valid |
size | The size of the buffer in bytes, will be reduced if the header could be read successfully, must be valid |
frameType | The resulting frame type |
isLittleEndian | True, if the buffer provides the data with little endian encoding; False, if the buffer provides the data with big endian encoding |
- Returns
- True, if succeeded
◆ readValue()
static bool Ocean::Media::Special::ImagePfm::readValue |
( |
const uint8_t *& |
data, |
|
|
size_t & |
size, |
|
|
std::string & |
value |
|
) |
| |
|
staticprotected |
Reads one number value from a given data buffer.
The value ends with a space or a new line.
- Parameters
-
data | The data buffer, will be moved if the value could be read successfully, must be valid |
size | The size of the buffer in bytes, will be reduced if the value could be read successfully, must be valid |
value | The resulting value |
- Returns
- True, if succeeded
The documentation for this class was generated from the following file: