OLD | NEW |
1 // Copyright 2014 PDFium Authors. All rights reserved. | 1 // Copyright 2014 PDFium Authors. All rights reserved. |
2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
4 | 4 |
5 // Original code copyright 2014 Foxit Software Inc. http://www.foxitsoftware.com | 5 // Original code copyright 2014 Foxit Software Inc. http://www.foxitsoftware.com |
6 | 6 |
7 #include "../../../include/fxcodec/fx_codec.h" | 7 #include "../../../include/fxcodec/fx_codec.h" |
8 #include "../../../include/fxge/fx_dib.h" | 8 #include "../../../include/fxge/fx_dib.h" |
9 #include "codec_int.h" | 9 #include "codec_int.h" |
10 extern "C" { | 10 extern "C" { |
11 #include "../fx_tiff/include/fx_tiffiop.h" | 11 #include "../fx_tiff/include/fx_tiffiop.h" |
12 } | 12 } |
13 void* IccLib_CreateTransform_sRGB(const unsigned char* pProfileData, unsigned in
t dwProfileSize, int nComponents, int intent, FX_DWORD dwSrcFormat = Icc_FORMAT_
DEFAULT); | 13 void* IccLib_CreateTransform_sRGB(const unsigned char* pProfileData, unsigned in
t dwProfileSize, int nComponents, int intent, FX_DWORD dwSrcFormat = Icc_FORMAT_
DEFAULT); |
14 void IccLib_TranslateImage(void* pTransform, unsigned char* pDest, const unsigne
d char* pSrc, int pixels); | 14 void IccLib_TranslateImage(void* pTransform, unsigned char* pDest, const unsigne
d char* pSrc, int pixels); |
15 void IccLib_DestroyTransform(void* pTransform); | 15 void IccLib_DestroyTransform(void* pTransform); |
16 class CCodec_TiffContext : public CFX_Object | 16 class CCodec_TiffContext |
17 { | 17 { |
18 public: | 18 public: |
19 CCodec_TiffContext(); | 19 CCodec_TiffContext(); |
20 ~CCodec_TiffContext(); | 20 ~CCodec_TiffContext(); |
21 | 21 |
22 FX_BOOL InitDecoder(IFX_FileRead* file_ptr); | 22 FX_BOOL InitDecoder(IFX_FileRead* file_ptr); |
23 void GetFrames(FX_INT32& frames); | 23 void GetFrames(FX_INT32& frames); |
24 FX_BOOL LoadFrameInfo(FX_INT32 frame, FX_DWORD& width, FX_DWORD& height,
FX_DWORD& comps, FX_DWORD& bpc, CFX_DIBAttribute* pAttribute); | 24 FX_BOOL LoadFrameInfo(FX_INT32 frame, FX_DWORD& width, FX_DWORD& height,
FX_DWORD& comps, FX_DWORD& bpc, CFX_DIBAttribute* pAttribute); |
25 FX_BOOL Decode(CFX_DIBitmap* pDIBitmap); | 25 FX_BOOL Decode(CFX_DIBitmap* pDIBitmap); |
26 | 26 |
(...skipping 488 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
515 FX_BOOL CCodec_TiffModule::Decode(void* ctx, class CFX_DIBitmap* pDIBitmap) | 515 FX_BOOL CCodec_TiffModule::Decode(void* ctx, class CFX_DIBitmap* pDIBitmap) |
516 { | 516 { |
517 CCodec_TiffContext* pDecoder = (CCodec_TiffContext*)ctx; | 517 CCodec_TiffContext* pDecoder = (CCodec_TiffContext*)ctx; |
518 return pDecoder->Decode(pDIBitmap); | 518 return pDecoder->Decode(pDIBitmap); |
519 } | 519 } |
520 void CCodec_TiffModule::DestroyDecoder(void* ctx) | 520 void CCodec_TiffModule::DestroyDecoder(void* ctx) |
521 { | 521 { |
522 CCodec_TiffContext* pDecoder = (CCodec_TiffContext*)ctx; | 522 CCodec_TiffContext* pDecoder = (CCodec_TiffContext*)ctx; |
523 delete pDecoder; | 523 delete pDecoder; |
524 } | 524 } |
OLD | NEW |