17 virtual ~
IImage() =
default;
27 virtual bool LoadImageFromMemory(
unsigned char* buffer,
unsigned int bufSize,
unsigned int width,
unsigned int height)=0;
37 virtual bool Decode(
unsigned char*
const pixels,
unsigned int width,
unsigned int height,
unsigned int pitch,
unsigned int format)=0;
51 virtual bool CreateThumbnailFromSurface(
unsigned char* bufferin,
unsigned int width,
unsigned int height,
unsigned int format,
unsigned int pitch,
const std::string& destFile,
52 unsigned char* &bufferout,
unsigned int &bufferoutSize)=0;
58 unsigned int Width()
const {
return m_width; }
59 unsigned int Height()
const {
return m_height; }
62 unsigned int Orientation()
const {
return m_orientation; }
63 bool hasAlpha()
const {
return m_hasAlpha; }
67 unsigned int m_width = 0;
68 unsigned int m_height = 0;
71 unsigned int m_orientation = 0;
72 bool m_hasAlpha =
false;
virtual bool LoadImageFromMemory(unsigned char *buffer, unsigned int bufSize, unsigned int width, unsigned int height)=0
Load an image from memory with the format m_strMimeType to determine it's size and orientation...
virtual bool Decode(unsigned char *const pixels, unsigned int width, unsigned int height, unsigned int pitch, unsigned int format)=0
Decodes the previously loaded image data to the output buffer in 32 bit raw bits. ...
unsigned int m_originalHeight
original image height before scaling or cropping
Definition: iimage.h:70
virtual bool CreateThumbnailFromSurface(unsigned char *bufferin, unsigned int width, unsigned int height, unsigned int format, unsigned int pitch, const std::string &destFile, unsigned char *&bufferout, unsigned int &bufferoutSize)=0
Encodes an thumbnail from raw bits of given memory location.
virtual void ReleaseThumbnailBuffer()
Frees the output buffer allocated by CreateThumbnailFromSurface.
Definition: iimage.h:56
unsigned int m_originalWidth
original image width before scaling or cropping
Definition: iimage.h:69