Class:  kodi::addon::CInstanceImageDecoder This usage can be requested under various conditions, by a Mimetype protocol defined in addon.xml or supported file extensions.
Include the header #include <kodi/addon-instance/ImageDecoder.h> to use this class.
Here is an example of what the addon.xml.in would look like for an image decoder addon:
addon.xml.These values are used by Kodi to identify associated images and file extensions and then to select the associated addon.
| Labels | Type | Description | 
|---|---|---|
| point | string | The identification of the addon instance to image decoder is mandatory kodi.imagedecoder. In addition, the instance declared in the first<extension ... />is also the main type of addon. | 
| extension | string | The from addon operated and supported image file endings. Use a |to separate between different ones. | 
| defaultPort | string | The from addon operated image mimetypes. Use a |to separate between different ones. | 
| library_@PLATFORM@ | string | The runtime library used for the addon. This is usually declared by cmakeand correctly displayed in the translatedaddon.xml. | 
addon.xml, see also https://kodi.wiki/view/Addon.xml.Example:
The destruction of the example class CMyImageDecoder is called from Kodi's header. Manually deleting the add-on instance is not required. 
| Modules | |
| Definitions, structures and enumerators | |
| Image decoder add-on general variables | |
| 
 | inlineexplicit | 
Class constructor.
| [in] | instance | The from Kodi given instance given be add-on CreateInstance call with instance id ADDON_INSTANCE_IMAGEDECODER. | 
| [in] | kodiVersion | [opt] Version used in Kodi for this instance, to allow compatibility to older Kodi versions. | 
kodiVersion. | 
 | pure virtual | 
Initialize an encoder.
| [in] | buffer | The data to read from memory | 
| [in] | bufSize | The buffer size | 
| [in,out] | width | The optimal width of image on entry, obtained width on return | 
| [in,out] | height | The optimal height of image, actual obtained height on return | 
| 
 | pure virtual | 
Decode previously loaded image.
| [in] | pixels | Output buffer | 
| [in] | width | Width of output image | 
| [in] | height | Height of output image | 
| [in] | pitch | Pitch of output image | 
| [in] | format | Format of output image | 
| 
 | inline | 
Callback to Kodi Function
Get the wanted mime type from Kodi.