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_FAXMODULE_H_ 8 #define CORE_FXCODEC_CODEC_CCODEC_FAXMODULE_H_ 9 10 #include <memory> 11 12 #include "core/fxcrt/fx_memory.h" 13 #include "core/fxcrt/fx_system.h" 14 15 class CCodec_ScanlineDecoder; 16 17 class CCodec_FaxModule { 18 public: 19 std::unique_ptr<CCodec_ScanlineDecoder> CreateDecoder(const uint8_t* src_buf, 20 uint32_t src_size, 21 int width, 22 int height, 23 int K, 24 bool EndOfLine, 25 bool EncodedByteAlign, 26 bool BlackIs1, 27 int Columns, 28 int Rows); 29 #if _FX_PLATFORM_ == _FX_PLATFORM_WINDOWS_ 30 static void FaxEncode(const uint8_t* src_buf, 31 int width, 32 int height, 33 int pitch, 34 std::unique_ptr<uint8_t, FxFreeDeleter>* dest_buf, 35 uint32_t* dest_size); 36 #endif // _FX_PLATFORM_ == _FX_PLATFORM_WINDOWS_ 37 }; 38 39 #endif // CORE_FXCODEC_CODEC_CCODEC_FAXMODULE_H_ 40