#include <ImageDecoder.h>
|
| | CImageDecoder (ADDON::BinaryAddonBasePtr addonBase) |
| |
| | ~CImageDecoder () override |
| |
| bool | Create (const std::string &mimetype) |
| |
| bool | CreateThumbnailFromSurface (unsigned char *, unsigned int, unsigned int, unsigned int, unsigned int, const std::string &, unsigned char *&, unsigned int &) override |
| | Encodes an thumbnail from raw bits of given memory location. More...
|
| |
| bool | LoadImageFromMemory (unsigned char *buffer, unsigned int bufSize, unsigned int width, unsigned int height) override |
| | Load an image from memory with the format m_strMimeType to determine it's size and orientation. More...
|
| |
| bool | Decode (unsigned char *const pixels, unsigned int width, unsigned int height, unsigned int pitch, unsigned int format) override |
| | Decodes the previously loaded image data to the output buffer in 32 bit raw bits. More...
|
| |
| const std::string & | GetMimetypes () const |
| |
| const std::string & | GetExtensions () const |
| |
Public Member Functions inherited from ADDON::IAddonInstanceHandler |
| | IAddonInstanceHandler (ADDON_TYPE type, const BinaryAddonBasePtr &addonBase, KODI_HANDLE parentInstance=nullptr, const std::string &instanceID="") |
| |
| virtual | ~IAddonInstanceHandler () |
| |
| ADDON_TYPE | UsedType () const |
| |
| const std::string & | InstanceID () |
| |
| std::string | ID () const |
| |
| std::string | Name () const |
| |
| std::string | Author () const |
| |
| std::string | Icon () const |
| |
| std::string | Path () const |
| |
| std::string | Profile () const |
| |
| AddonVersion | Version () const |
| |
| ADDON_STATUS | CreateInstance (KODI_HANDLE instance) |
| |
| void | DestroyInstance () |
| |
| const AddonDllPtr & | Addon () const |
| |
| BinaryAddonBasePtr | GetAddonBase () const |
| |
| virtual | ~IImage ()=default |
| |
| virtual void | ReleaseThumbnailBuffer () |
| | Frees the output buffer allocated by CreateThumbnailFromSurface. More...
|
| |
| unsigned int | Width () const |
| |
| unsigned int | Height () const |
| |
| unsigned int | originalWidth () const |
| |
| unsigned int | originalHeight () const |
| |
| unsigned int | Orientation () const |
| |
| bool | hasAlpha () const |
| |
§ CImageDecoder()
§ ~CImageDecoder()
| ADDON::CImageDecoder::~CImageDecoder |
( |
| ) |
|
|
override |
§ Create()
| bool ADDON::CImageDecoder::Create |
( |
const std::string & |
mimetype | ) |
|
§ CreateThumbnailFromSurface()
| bool ADDON::CImageDecoder::CreateThumbnailFromSurface |
( |
unsigned char * |
bufferin, |
|
|
unsigned |
width, |
|
|
unsigned |
height, |
|
|
unsigned |
format, |
|
|
unsigned |
pitch, |
|
|
const std::string & |
destFile, |
|
|
unsigned char *& |
bufferout, |
|
|
unsigned int & |
bufferoutSize |
|
) |
| |
|
inlineoverridevirtual |
Encodes an thumbnail from raw bits of given memory location.
- Parameters
-
| bufferin | The memory location where the image data can be found |
| width | The width of the thumbnail |
| height | The height of the thumbnail |
| format | The format of the input buffer (JpegIO only) |
| pitch | The pitch of the input texture stored in bufferin |
| destFile | The destination path of the thumbnail to determine the image format from the extension |
| bufferout | The output buffer (will be allocated inside the method) |
| bufferoutSize | The output buffer size |
- Returns
- true if the thumbnail was successfully created
Implements IImage.
§ Decode()
| bool ADDON::CImageDecoder::Decode |
( |
unsigned char *const |
pixels, |
|
|
unsigned int |
width, |
|
|
unsigned int |
height, |
|
|
unsigned int |
pitch, |
|
|
unsigned int |
format |
|
) |
| |
|
overridevirtual |
Decodes the previously loaded image data to the output buffer in 32 bit raw bits.
- Parameters
-
| pixels | The output buffer |
| width | The width of the image |
| height | The height of the image |
| pitch | The pitch of the output buffer |
| format | The format of the output buffer (JpegIO only) |
- Returns
- true if the image data could be decoded to the output buffer
Implements IImage.
§ GetExtensions()
| const std::string& ADDON::CImageDecoder::GetExtensions |
( |
| ) |
const |
|
inline |
§ GetMimetypes()
| const std::string& ADDON::CImageDecoder::GetMimetypes |
( |
| ) |
const |
|
inline |
§ LoadImageFromMemory()
| bool ADDON::CImageDecoder::LoadImageFromMemory |
( |
unsigned char * |
buffer, |
|
|
unsigned int |
bufSize, |
|
|
unsigned int |
width, |
|
|
unsigned int |
height |
|
) |
| |
|
overridevirtual |
Load an image from memory with the format m_strMimeType to determine it's size and orientation.
- Parameters
-
| buffer | The memory location where the image data can be found |
| bufSize | The size of the buffer |
| width | The ideal width of the texture |
| height | The ideal height of the texture |
- Returns
- true if the image could be loaded
Implements IImage.
§ m_extension
| std::string ADDON::CImageDecoder::m_extension |
|
protected |
§ m_mimetype
| std::string ADDON::CImageDecoder::m_mimetype |
|
protected |
§ m_struct
The documentation for this class was generated from the following files: