You.i Engine
YiImageDecoderWEBP.h
Go to the documentation of this file.
1 // © You i Labs Inc. 2000-2017. All rights reserved.
2 #ifndef _YI_DECODER_WEBP_H_
3 #define _YI_DECODER_WEBP_H_
4 
5 class CYIBitmap;
6 class CYIBitmapPriv;
7 class CYIImageDecoderWEBPPriv;
8 
9 #include "asset/YiImageDecoder.h"
10 
17 {
18 
19 public:
21  virtual ~CYIImageDecoderWEBP();
22 
23  virtual bool GetImageDimensions(const CYIString &path, uint32_t *pnWidth, uint32_t *pnHeight) override;
24 
29  virtual bool IsFormatSupported(const uint8_t *pData, uint32_t nDataSize) override;
30 
31 protected:
32  virtual std::unique_ptr<CYIBitmap> DecodeImpl(const CYIString &path, YI_DECODER_BITMAP_PARAMS *pParams) override;
33 
34  virtual std::unique_ptr<CYIBitmap> DecodeImpl(const uint8_t *fileData, uint32_t nDataSize, YI_DECODER_BITMAP_PARAMS *pParams) override;
35 
36 private:
37  void ReadToBuffer(const CYIString &path, std::vector<uint8_t> *rawData);
38 
39  CYIImageDecoderWEBPPriv *m_pPriv;
40 
42 };
43 
46 #endif /* _YI_DECODER_WEBP_H_ */
#define YI_DISALLOW_COPY_AND_ASSIGN(TypeName)
Delete the copy constructor and assignment operator (and consequently the move constructor as well) ...
Definition: YiPredef.h:114
Container class for Unicode strings. Conceptually, a CYIString object is a sequence of Unicode charac...
Definition: YiString.h:35
virtual std::unique_ptr< CYIBitmap > DecodeImpl(const CYIString &path, YI_DECODER_BITMAP_PARAMS *pParams) override
The core bitmap container class used by You.i Engine.
Definition: YiBitmap.h:20
Definition: YiImageDecoderWEBP.h:16
virtual bool IsFormatSupported(const uint8_t *pData, uint32_t nDataSize) override
virtual bool GetImageDimensions(const CYIString &path, uint32_t *pnWidth, uint32_t *pnHeight) override
General container for passing parameters to an image decoder.
Definition: YiImageDecoder.h:18
virtual ~CYIImageDecoderWEBP()
Raster image decoder base class; all raster image decoders should sub-type this class.
Definition: YiImageDecoder.h:41