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_ICCMODULE_H_ 8 #define CORE_FXCODEC_CODEC_CCODEC_ICCMODULE_H_ 9 10 #include "core/fxcodec/fx_codec_def.h" 11 #include "core/fxcrt/fx_string.h" 12 #include "core/fxcrt/fx_system.h" 13 14 class CCodec_IccModule { 15 public: 16 CCodec_IccModule(); 17 ~CCodec_IccModule(); 18 19 void* CreateTransform_sRGB(const uint8_t* pProfileData, 20 uint32_t dwProfileSize, 21 uint32_t& nComponents, 22 int32_t intent = 0, 23 uint32_t dwSrcFormat = Icc_FORMAT_DEFAULT); 24 void DestroyTransform(void* pTransform); 25 void Translate(void* pTransform, FX_FLOAT* pSrcValues, FX_FLOAT* pDestValues); 26 void TranslateScanline(void* pTransform, 27 uint8_t* pDest, 28 const uint8_t* pSrc, 29 int pixels); SetComponents(uint32_t nComponents)30 void SetComponents(uint32_t nComponents) { m_nComponents = nComponents; } 31 32 protected: 33 uint32_t m_nComponents; 34 }; 35 36 #endif // CORE_FXCODEC_CODEC_CCODEC_ICCMODULE_H_ 37