| Index: core/src/fxcodec/codec/codec_int.h
|
| diff --git a/core/src/fxcodec/codec/codec_int.h b/core/src/fxcodec/codec/codec_int.h
|
| index 1495f9e680f243e1b103df112192733d4aee0c65..5abe2e4a6ae2c84c5cff41b85583dc4b673309e8 100644
|
| --- a/core/src/fxcodec/codec/codec_int.h
|
| +++ b/core/src/fxcodec/codec/codec_int.h
|
| @@ -187,11 +187,83 @@ class CCodec_JpegModule : public ICodec_JpegModule {
|
| void Input(void* pContext,
|
| const uint8_t* src_buf,
|
| FX_DWORD src_size) override;
|
| +#ifndef PDF_ENABLE_XFA
|
| int ReadHeader(void* pContext, int* width, int* height, int* nComps) override;
|
| +#else
|
| + int ReadHeader(void* pContext,
|
| + int* width,
|
| + int* height,
|
| + int* nComps,
|
| + CFX_DIBAttribute* pAttribute) override;
|
| +#endif
|
| int StartScanline(void* pContext, int down_scale) override;
|
| FX_BOOL ReadScanline(void* pContext, uint8_t* dest_buf) override;
|
| FX_DWORD GetAvailInput(void* pContext, uint8_t** avail_buf_ptr) override;
|
| };
|
| +#ifdef PDF_ENABLE_XFA
|
| +#define PNG_ERROR_SIZE 256
|
| +class CCodec_PngModule : public ICodec_PngModule {
|
| + public:
|
| + CCodec_PngModule() { FXSYS_memset(m_szLastError, '\0', PNG_ERROR_SIZE); }
|
| +
|
| + virtual void* Start(void* pModule);
|
| + virtual void Finish(void* pContext);
|
| + virtual FX_BOOL Input(void* pContext,
|
| + const uint8_t* src_buf,
|
| + FX_DWORD src_size,
|
| + CFX_DIBAttribute* pAttribute);
|
| +
|
| + protected:
|
| + FX_CHAR m_szLastError[PNG_ERROR_SIZE];
|
| +};
|
| +class CCodec_GifModule : public ICodec_GifModule {
|
| + public:
|
| + CCodec_GifModule() { FXSYS_memset(m_szLastError, '\0', 256); }
|
| + virtual void* Start(void* pModule);
|
| + virtual void Finish(void* pContext);
|
| + virtual FX_DWORD GetAvailInput(void* pContext, uint8_t** avail_buf_ptr);
|
| + virtual void Input(void* pContext, const uint8_t* src_buf, FX_DWORD src_size);
|
| +
|
| + virtual int32_t ReadHeader(void* pContext,
|
| + int* width,
|
| + int* height,
|
| + int* pal_num,
|
| + void** pal_pp,
|
| + int* bg_index,
|
| + CFX_DIBAttribute* pAttribute);
|
| +
|
| + virtual int32_t LoadFrameInfo(void* pContext, int* frame_num);
|
| +
|
| + virtual int32_t LoadFrame(void* pContext,
|
| + int frame_num,
|
| + CFX_DIBAttribute* pAttribute);
|
| +
|
| + protected:
|
| + FX_CHAR m_szLastError[256];
|
| +};
|
| +class CCodec_BmpModule : public ICodec_BmpModule {
|
| + public:
|
| + CCodec_BmpModule() { FXSYS_memset(m_szLastError, 0, sizeof(m_szLastError)); }
|
| + void* Start(void* pModule) override;
|
| + void Finish(void* pContext) override;
|
| + FX_DWORD GetAvailInput(void* pContext, uint8_t** avail_buf_ptr) override;
|
| + void Input(void* pContext,
|
| + const uint8_t* src_buf,
|
| + FX_DWORD src_size) override;
|
| + int32_t ReadHeader(void* pContext,
|
| + int32_t* width,
|
| + int32_t* height,
|
| + FX_BOOL* tb_flag,
|
| + int32_t* components,
|
| + int32_t* pal_num,
|
| + FX_DWORD** pal_pp,
|
| + CFX_DIBAttribute* pAttribute) override;
|
| + int32_t LoadImage(void* pContext) override;
|
| +
|
| + protected:
|
| + FX_CHAR m_szLastError[256];
|
| +};
|
| +#endif
|
| class CCodec_IccModule : public ICodec_IccModule {
|
| public:
|
| ~CCodec_IccModule() override;
|
| @@ -270,6 +342,27 @@ class CCodec_JpxModule : public ICodec_JpxModule {
|
| void DestroyDecoder(CJPX_Decoder* pDecoder) override;
|
| };
|
|
|
| +#ifdef PDF_ENABLE_XFA
|
| +class CCodec_TiffModule : public ICodec_TiffModule {
|
| + public:
|
| + // ICodec_TiffModule
|
| + void* CreateDecoder(IFX_FileRead* file_ptr) override;
|
| + void GetFrames(void* ctx, int32_t& frames) override;
|
| + FX_BOOL LoadFrameInfo(void* ctx,
|
| + int32_t frame,
|
| + FX_DWORD& width,
|
| + FX_DWORD& height,
|
| + FX_DWORD& comps,
|
| + FX_DWORD& bpc,
|
| + CFX_DIBAttribute* pAttribute) override;
|
| + FX_BOOL Decode(void* ctx, class CFX_DIBitmap* pDIBitmap) override;
|
| + void DestroyDecoder(void* ctx) override;
|
| +
|
| + protected:
|
| + ~CCodec_TiffModule() override {}
|
| +};
|
| +
|
| +#endif
|
| class CCodec_Jbig2Context {
|
| public:
|
| CCodec_Jbig2Context();
|
|
|