blob: f84e7524ba0eeed6bbbe36a81df71e09def0b457 [file] [log] [blame]
John Abd-El-Malek3f3b45c2014-05-23 17:28:10 -07001// Copyright 2014 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.
Lei Zhang95e854f2015-06-13 00:58:06 -07004
John Abd-El-Malek3f3b45c2014-05-23 17:28:10 -07005// Original code copyright 2014 Foxit Software Inc. http://www.foxitsoftware.com
6
dsinclair8a4e2862016-09-29 13:43:30 -07007#ifndef CORE_FXCODEC_FX_CODEC_H_
8#define CORE_FXCODEC_FX_CODEC_H_
Tom Sepez19922bb2015-05-28 13:23:12 -07009
Tom Sepez83488a82015-10-29 09:51:03 -070010#include <map>
Lei Zhange95f39f2015-10-01 14:08:32 -070011
Lei Zhangbda113c2018-05-08 14:57:47 +000012#include "core/fxcrt/fx_safe_types.h"
Tom Sepez19922bb2015-05-28 13:23:12 -070013
Lei Zhangae70ea32019-06-14 17:30:00 +000014namespace fxcodec {
15
Tom Sepez73c9f3b2017-02-27 10:12:59 -080016#ifdef PDF_ENABLE_XFA
Tom Sepezba692bf2015-10-30 13:11:31 -070017class CFX_DIBAttribute {
18 public:
19 CFX_DIBAttribute();
20 ~CFX_DIBAttribute();
21
Ryan Harrison660843f2018-05-10 19:11:37 +000022 int32_t m_nXDPI = -1;
23 int32_t m_nYDPI = -1;
Ryan Harrison660843f2018-05-10 19:11:37 +000024 uint16_t m_wDPIUnit = 0;
tsepezb5e8f142016-03-25 15:18:35 -070025 std::map<uint32_t, void*> m_Exif;
Tom Sepezba692bf2015-10-30 13:11:31 -070026};
Tom Sepeza2c42ce2015-11-25 15:52:28 -080027#endif // PDF_ENABLE_XFA
Tom Sepezba692bf2015-10-30 13:11:31 -070028
dan sinclair61b2fc72016-03-23 19:21:44 -040029void ReverseRGB(uint8_t* pDestBuf, const uint8_t* pSrcBuf, int pixels);
Lei Zhang1e87d8a2015-09-28 14:21:09 -070030
Lei Zhangbda113c2018-05-08 14:57:47 +000031FX_SAFE_UINT32 CalculatePitch8(uint32_t bpc, uint32_t components, int width);
32FX_SAFE_UINT32 CalculatePitch32(int bpp, int width);
33
Lei Zhangded361e2019-06-14 17:29:09 +000034} // namespace fxcodec
35
Lei Zhangae70ea32019-06-14 17:30:00 +000036#ifdef PDF_ENABLE_XFA
37using CFX_DIBAttribute = fxcodec::CFX_DIBAttribute;
38#endif
39
dsinclair8a4e2862016-09-29 13:43:30 -070040#endif // CORE_FXCODEC_FX_CODEC_H_