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_PNGMODULE_H_ 8 #define CORE_FXCODEC_CODEC_CCODEC_PNGMODULE_H_ 9 10 #include "core/fxcodec/codec/icodec_pngmodule.h" 11 #include "core/fxcrt/fx_system.h" 12 13 #define PNG_ERROR_SIZE 256 14 15 class CCodec_PngModule : public ICodec_PngModule { 16 public: 17 CCodec_PngModule(); 18 ~CCodec_PngModule() override; 19 20 FXPNG_Context* Start() override; 21 void Finish(FXPNG_Context* pContext) override; 22 bool Input(FXPNG_Context* pContext, 23 const uint8_t* src_buf, 24 uint32_t src_size, 25 CFX_DIBAttribute* pAttribute) override; 26 27 protected: 28 FX_CHAR m_szLastError[PNG_ERROR_SIZE]; 29 }; 30 31 #endif // CORE_FXCODEC_CODEC_CCODEC_PNGMODULE_H_ 32