// Copyright 2016 The PDFium Authors // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. // Original code copyright 2014 Foxit Software Inc. http://www.foxitsoftware.com #ifndef CORE_FXCODEC_ICC_ICC_TRANSFORM_H_ #define CORE_FXCODEC_ICC_ICC_TRANSFORM_H_ #include #include #include "core/fxcodec/fx_codec_def.h" #include "third_party/base/span.h" #if defined(USE_SYSTEM_LCMS2) #include #else #include "third_party/lcms/include/lcms2.h" #endif namespace fxcodec { class IccTransform { public: static std::unique_ptr CreateTransformSRGB( pdfium::span span); ~IccTransform(); void Translate(pdfium::span pSrcValues, pdfium::span pDestValues); void TranslateScanline(pdfium::span pDest, pdfium::span pSrc, int pixels); int components() const { return m_nSrcComponents; } bool IsNormal() const { return m_bNormal; } private: IccTransform(cmsHTRANSFORM transform, int srcComponents, bool bIsLab, bool bNormal); const cmsHTRANSFORM m_hTransform; const int m_nSrcComponents; const bool m_bLab; const bool m_bNormal; }; } // namespace fxcodec #endif // CORE_FXCODEC_ICC_ICC_TRANSFORM_H_