You.i Engine
YiImageDecoderJPG.h
Go to the documentation of this file.
1 // © You i Labs Inc. 2000-2017. All rights reserved.
2 #ifndef _YI_DECODER_JPG_H_
3 #define _YI_DECODER_JPG_H_
4 
5 #include "asset/YiImageDecoder.h"
6 
12 class CYIBitmap;
13 class CYIBitmapPriv;
14 class CYIImageDecoderJPGPriv;
15 
20 {
21  friend class CYIImageDecoderJPGPriv;
22 public:
24  virtual ~CYIImageDecoderJPG();
25 
26  virtual bool GetImageDimensions(const CYIString &path, uint32_t *pnWidth, uint32_t *pnHeight) override;
27 
28 protected:
29  virtual std::unique_ptr<CYIBitmap> DecodeImpl(const CYIString &path, YI_DECODER_BITMAP_PARAMS *pParams) override;
30 
31  virtual std::unique_ptr<CYIBitmap> DecodeImpl(const uint8_t *fileData, uint32_t nDataSize, YI_DECODER_BITMAP_PARAMS *pParams) override;
32 
33 private:
34  CYIBitmapPriv *DoDecompression(struct jpeg_decompress_struct &cinfo, CYIBitmap *buffer, int32_t nX, int32_t nY);
35 
36  CYIImageDecoderJPGPriv *m_pPriv;
37 
39 };
40 
43 #endif // _YI_DECODER_JPG_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
The core bitmap container class used by You.i Engine.
Definition: YiBitmap.h:20
virtual ~CYIImageDecoderJPG()
friend class CYIImageDecoderJPGPriv
Definition: YiImageDecoderJPG.h:21
Image decoder for the JPEG file format.
Definition: YiImageDecoderJPG.h:19
virtual std::unique_ptr< CYIBitmap > DecodeImpl(const CYIString &path, YI_DECODER_BITMAP_PARAMS *pParams) override
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
virtual bool GetImageDimensions(const CYIString &path, uint32_t *pnWidth, uint32_t *pnHeight) override