1 // Copyright 2016 PDFium Authors. All rights reserved. 2 // Use of this source code is governed by a BSD-style license that can be 3 // found in the LICENSE file. 4 5 // Original code copyright 2014 Foxit Software Inc. http://www.foxitsoftware.com 6 7 #ifndef CORE_FXCODEC_CODEC_CCODEC_TIFFMODULE_H_ 8 #define CORE_FXCODEC_CODEC_CCODEC_TIFFMODULE_H_ 9 10 #include <memory> 11 12 #include "core/fxcrt/fx_system.h" 13 #include "core/fxcrt/retain_ptr.h" 14 #include "core/fxge/dib/cfx_dibitmap.h" 15 16 class CFX_DIBAttribute; 17 class IFX_SeekableReadStream; 18 19 class CCodec_TiffModule { 20 public: 21 class Context { 22 public: 23 virtual ~Context() {} 24 }; 25 26 std::unique_ptr<Context> CreateDecoder( 27 const RetainPtr<IFX_SeekableReadStream>& file_ptr); 28 bool LoadFrameInfo(Context* ctx, 29 int32_t frame, 30 int32_t* width, 31 int32_t* height, 32 int32_t* comps, 33 int32_t* bpc, 34 CFX_DIBAttribute* pAttribute); 35 bool Decode(Context* ctx, const RetainPtr<CFX_DIBitmap>& pDIBitmap); 36 }; 37 38 #endif // CORE_FXCODEC_CODEC_CCODEC_TIFFMODULE_H_ 39