John Abd-El-Malek | 3f3b45c | 2014-05-23 17:28:10 -0700 | [diff] [blame] | 1 | // 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 Zhang | 95e854f | 2015-06-13 00:58:06 -0700 | [diff] [blame] | 4 | |
John Abd-El-Malek | 3f3b45c | 2014-05-23 17:28:10 -0700 | [diff] [blame] | 5 | // Original code copyright 2014 Foxit Software Inc. http://www.foxitsoftware.com |
| 6 | |
dsinclair | 8a4e286 | 2016-09-29 13:43:30 -0700 | [diff] [blame] | 7 | #ifndef CORE_FXCODEC_FX_CODEC_H_ |
| 8 | #define CORE_FXCODEC_FX_CODEC_H_ |
Tom Sepez | 19922bb | 2015-05-28 13:23:12 -0700 | [diff] [blame] | 9 | |
Tom Sepez | 83488a8 | 2015-10-29 09:51:03 -0700 | [diff] [blame] | 10 | #include <map> |
Lei Zhang | e95f39f | 2015-10-01 14:08:32 -0700 | [diff] [blame] | 11 | |
Lei Zhang | bda113c | 2018-05-08 14:57:47 +0000 | [diff] [blame] | 12 | #include "core/fxcrt/fx_safe_types.h" |
Tom Sepez | 19922bb | 2015-05-28 13:23:12 -0700 | [diff] [blame] | 13 | |
Lei Zhang | ae70ea3 | 2019-06-14 17:30:00 +0000 | [diff] [blame] | 14 | namespace fxcodec { |
| 15 | |
Tom Sepez | 73c9f3b | 2017-02-27 10:12:59 -0800 | [diff] [blame] | 16 | #ifdef PDF_ENABLE_XFA |
Tom Sepez | ba692bf | 2015-10-30 13:11:31 -0700 | [diff] [blame] | 17 | class CFX_DIBAttribute { |
| 18 | public: |
| 19 | CFX_DIBAttribute(); |
| 20 | ~CFX_DIBAttribute(); |
| 21 | |
Ryan Harrison | 660843f | 2018-05-10 19:11:37 +0000 | [diff] [blame] | 22 | int32_t m_nXDPI = -1; |
| 23 | int32_t m_nYDPI = -1; |
Ryan Harrison | 660843f | 2018-05-10 19:11:37 +0000 | [diff] [blame] | 24 | uint16_t m_wDPIUnit = 0; |
tsepez | b5e8f14 | 2016-03-25 15:18:35 -0700 | [diff] [blame] | 25 | std::map<uint32_t, void*> m_Exif; |
Tom Sepez | ba692bf | 2015-10-30 13:11:31 -0700 | [diff] [blame] | 26 | }; |
Tom Sepez | a2c42ce | 2015-11-25 15:52:28 -0800 | [diff] [blame] | 27 | #endif // PDF_ENABLE_XFA |
Tom Sepez | ba692bf | 2015-10-30 13:11:31 -0700 | [diff] [blame] | 28 | |
dan sinclair | 61b2fc7 | 2016-03-23 19:21:44 -0400 | [diff] [blame] | 29 | void ReverseRGB(uint8_t* pDestBuf, const uint8_t* pSrcBuf, int pixels); |
Lei Zhang | 1e87d8a | 2015-09-28 14:21:09 -0700 | [diff] [blame] | 30 | |
Lei Zhang | bda113c | 2018-05-08 14:57:47 +0000 | [diff] [blame] | 31 | FX_SAFE_UINT32 CalculatePitch8(uint32_t bpc, uint32_t components, int width); |
| 32 | FX_SAFE_UINT32 CalculatePitch32(int bpp, int width); |
| 33 | |
Lei Zhang | ded361e | 2019-06-14 17:29:09 +0000 | [diff] [blame] | 34 | } // namespace fxcodec |
| 35 | |
Lei Zhang | ae70ea3 | 2019-06-14 17:30:00 +0000 | [diff] [blame] | 36 | #ifdef PDF_ENABLE_XFA |
| 37 | using CFX_DIBAttribute = fxcodec::CFX_DIBAttribute; |
| 38 | #endif |
| 39 | |
dsinclair | 8a4e286 | 2016-09-29 13:43:30 -0700 | [diff] [blame] | 40 | #endif // CORE_FXCODEC_FX_CODEC_H_ |