2 #ifndef _YI_IMAGE_DECODER_H_ 3 #define _YI_IMAGE_DECODER_H_ 45 CYIImageDecoder(
bool bIsAnimationSupported,
bool bIsPreallocatedBitmapSupported);
51 bool IsAnimationSupported();
56 bool IsPreAllocatedBitmapSupported();
68 std::unique_ptr<CYIBitmap> Decode(
const uint8_t *pData, uint32_t nDataSize,
YI_DECODER_BITMAP_PARAMS *pParams =
nullptr);
80 virtual bool GetImageDimensions(
const CYIString &path, uint32_t *pnWidth, uint32_t *pnHeight);
86 virtual std::unique_ptr<CYIBitmap> DecodeImpl(
const uint8_t *pData, uint32_t nDataSize,
YI_DECODER_BITMAP_PARAMS *pParams) = 0;
98 void SetMagicByteInformation(uint32_t uMagicByteOffset,
const std::vector<const char *> &possibleSequences);
101 std::vector<const char *> m_magicByteSequences;
102 uint32_t m_nMagicByteOffset;
104 bool m_bSupportPreallocatedBitmap;
105 bool m_bSupportAnimation;
110 #endif // _YI_IMAGE_DECODER_H_
Base class for all specialized raster image decoders.
Definition: YiAssetDecoderImage.h:21
_YI_DECODER_BITMAP_PARAMS()
Definition: YiImageDecoder.h:20
int32_t nHeight
Definition: YiImageDecoder.h:30
LOAD_COLOR_MODE
Definition: YiImageAssetLoadParams.h:28
Container class for Unicode strings. Conceptually, a CYIString object is a sequence of Unicode charac...
Definition: YiString.h:35
CYIImageAssetLoadParams::LOAD_COLOR_MODE eLoadColorMode
Definition: YiImageDecoder.h:34
bool bPremultiplyAlpha
Definition: YiImageDecoder.h:33
The core bitmap container class used by You.i Engine.
Definition: YiBitmap.h:20
Asset loading parameters which are specific to image asset decoding.
Definition: YiImageAssetLoadParams.h:22
virtual bool IsFormatSupported(const uint8_t *pData, uint32_t nDataSize) override
int32_t nTargetDepth
Definition: YiImageDecoder.h:31
struct _YI_DECODER_BITMAP_PARAMS YI_DECODER_BITMAP_PARAMS
General container for passing parameters to an image decoder.
int32_t nWidth
Definition: YiImageDecoder.h:29
CYIBitmap * pDestBitmap
Definition: YiImageDecoder.h:32
General container for passing parameters to an image decoder.
Definition: YiImageDecoder.h:18
Raster image decoder base class; all raster image decoders should sub-type this class.
Definition: YiImageDecoder.h:41