8 #ifndef META_OCEAN_MEDIA_OPEN_IMAGE_LIBRARIES_IMAGE_PNG_H
9 #define META_OCEAN_MEDIA_OPEN_IMAGE_LIBRARIES_IMAGE_PNG_H
16 #ifdef OCEAN_MEDIA_OIL_SUPPORT_PNG
24 namespace OpenImageLibraries
63 static bool encodeImage(
const Frame& frame, std::vector<uint8_t>& buffer,
const bool allowConversion =
true,
bool* hasBeenConverted =
nullptr);
112 static void readInputData(
void* pngReadStruct,
unsigned char* outBytes,
const size_t byteCountToRead);
120 static void writeOutputData(
void* pngWriteStruct,
unsigned char* buffer,
const size_t size);
126 static inline void flushOutputData(
void* pngWriteStruct);
This class implements Ocean's image class.
Definition: Frame.h:1792
PixelFormat
Definition of all pixel formats available in the Ocean framework.
Definition: Frame.h:183
@ FORMAT_YA16
Pixel format with byte order YA and 16 bits per pixel.
Definition: Frame.h:649
@ FORMAT_Y16
Pixel format with 16 bits Y frame.
Definition: Frame.h:634
@ FORMAT_RGBA64
Pixel format with byte order RGBA and 64 bits per pixel, with 16 bit per component.
Definition: Frame.h:675
@ FORMAT_RGBA32
Pixel format with byte order RGBA and 32 bits per pixel.
Definition: Frame.h:382
@ FORMAT_RGB24
Pixel format with byte order RGB and 24 bits per pixel.
Definition: Frame.h:315
@ FORMAT_Y8
Pixel format for grayscale images with byte order Y and 8 bits per pixel.
Definition: Frame.h:594
PixelOrigin
Defines different types of frame origin positions.
Definition: Frame.h:1046
@ ORIGIN_UPPER_LEFT
The first pixel lies in the upper left corner, the last pixel in the lower right corner.
Definition: Frame.h:1050
The namespace covering the entire Ocean framework.
Definition: Accessor.h:15