| OLD | NEW |
| 1 // Copyright 2016 PDFium Authors. All rights reserved. | 1 // Copyright 2016 PDFium Authors. All rights reserved. |
| 2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
| 4 | 4 |
| 5 // Original code copyright 2014 Foxit Software Inc. http://www.foxitsoftware.com | 5 // Original code copyright 2014 Foxit Software Inc. http://www.foxitsoftware.com |
| 6 | 6 |
| 7 #ifndef CORE_FPDFAPI_PAGE_CPDF_IMAGE_H_ | 7 #ifndef CORE_FPDFAPI_PAGE_CPDF_IMAGE_H_ |
| 8 #define CORE_FPDFAPI_PAGE_CPDF_IMAGE_H_ | 8 #define CORE_FPDFAPI_PAGE_CPDF_IMAGE_H_ |
| 9 | 9 |
| 10 #include "core/fpdfapi/parser/cpdf_stream.h" | 10 #include "core/fpdfapi/parser/cpdf_stream.h" |
| 11 #include "core/fxcrt/fx_system.h" | 11 #include "core/fxcrt/fx_system.h" |
| 12 | 12 |
| 13 #define PDF_IMAGE_NO_COMPRESS 0x0000 | 13 #define PDF_IMAGE_NO_COMPRESS 0x0000 |
| 14 #define PDF_IMAGE_LOSSY_COMPRESS 0x0001 | 14 #define PDF_IMAGE_LOSSY_COMPRESS 0x0001 |
| 15 #define PDF_IMAGE_LOSSLESS_COMPRESS 0x0002 | 15 #define PDF_IMAGE_LOSSLESS_COMPRESS 0x0002 |
| 16 #define PDF_IMAGE_MASK_LOSSY_COMPRESS 0x0004 | 16 #define PDF_IMAGE_MASK_LOSSY_COMPRESS 0x0004 |
| 17 #define PDF_IMAGE_MASK_LOSSLESS_COMPRESS 0x0008 | 17 #define PDF_IMAGE_MASK_LOSSLESS_COMPRESS 0x0008 |
| 18 | 18 |
| 19 class CFX_DIBSource; |
| 19 class CFX_DIBitmap; | 20 class CFX_DIBitmap; |
| 20 class CFX_DIBSource; | |
| 21 class CPDF_Dictionay; | 21 class CPDF_Dictionay; |
| 22 class CPDF_Document; | 22 class CPDF_Document; |
| 23 class CPDF_Page; | 23 class CPDF_Page; |
| 24 class IFX_FileRead; | |
| 25 class IFX_FileWrite; | |
| 26 class IFX_Pause; | 24 class IFX_Pause; |
| 25 class IFX_SeekableReadStream; |
| 26 class IFX_SeekableWriteStream; |
| 27 | 27 |
| 28 class CPDF_Image { | 28 class CPDF_Image { |
| 29 public: | 29 public: |
| 30 explicit CPDF_Image(CPDF_Document* pDoc); | 30 explicit CPDF_Image(CPDF_Document* pDoc); |
| 31 CPDF_Image(CPDF_Document* pDoc, UniqueStream pStream); | 31 CPDF_Image(CPDF_Document* pDoc, UniqueStream pStream); |
| 32 CPDF_Image(CPDF_Document* pDoc, uint32_t dwStreamObjNum); | 32 CPDF_Image(CPDF_Document* pDoc, uint32_t dwStreamObjNum); |
| 33 ~CPDF_Image(); | 33 ~CPDF_Image(); |
| 34 | 34 |
| 35 CPDF_Image* Clone(); | 35 CPDF_Image* Clone(); |
| 36 | 36 |
| (...skipping 12 matching lines...) Expand all Loading... |
| 49 bool IsMask() const { return m_bIsMask; } | 49 bool IsMask() const { return m_bIsMask; } |
| 50 bool IsInterpol() const { return m_bInterpolate; } | 50 bool IsInterpol() const { return m_bInterpolate; } |
| 51 | 51 |
| 52 CFX_DIBSource* LoadDIBSource(CFX_DIBSource** ppMask = nullptr, | 52 CFX_DIBSource* LoadDIBSource(CFX_DIBSource** ppMask = nullptr, |
| 53 uint32_t* pMatteColor = nullptr, | 53 uint32_t* pMatteColor = nullptr, |
| 54 FX_BOOL bStdCS = FALSE, | 54 FX_BOOL bStdCS = FALSE, |
| 55 uint32_t GroupFamily = 0, | 55 uint32_t GroupFamily = 0, |
| 56 FX_BOOL bLoadMask = FALSE) const; | 56 FX_BOOL bLoadMask = FALSE) const; |
| 57 | 57 |
| 58 void SetImage(const CFX_DIBitmap* pDIBitmap, int32_t iCompress); | 58 void SetImage(const CFX_DIBitmap* pDIBitmap, int32_t iCompress); |
| 59 void SetJpegImage(IFX_FileRead* pFile); | 59 void SetJpegImage(IFX_SeekableReadStream* pFile); |
| 60 | 60 |
| 61 void ResetCache(CPDF_Page* pPage, const CFX_DIBitmap* pDIBitmap); | 61 void ResetCache(CPDF_Page* pPage, const CFX_DIBitmap* pDIBitmap); |
| 62 | 62 |
| 63 FX_BOOL StartLoadDIBSource(CPDF_Dictionary* pFormResource, | 63 FX_BOOL StartLoadDIBSource(CPDF_Dictionary* pFormResource, |
| 64 CPDF_Dictionary* pPageResource, | 64 CPDF_Dictionary* pPageResource, |
| 65 FX_BOOL bStdCS = FALSE, | 65 FX_BOOL bStdCS = FALSE, |
| 66 uint32_t GroupFamily = 0, | 66 uint32_t GroupFamily = 0, |
| 67 FX_BOOL bLoadMask = FALSE); | 67 FX_BOOL bLoadMask = FALSE); |
| 68 FX_BOOL Continue(IFX_Pause* pPause); | 68 FX_BOOL Continue(IFX_Pause* pPause); |
| 69 CFX_DIBSource* DetachBitmap(); | 69 CFX_DIBSource* DetachBitmap(); |
| (...skipping 13 matching lines...) Expand all Loading... |
| 83 bool m_bInterpolate = false; | 83 bool m_bInterpolate = false; |
| 84 CPDF_Document* const m_pDocument; | 84 CPDF_Document* const m_pDocument; |
| 85 CPDF_Stream* m_pStream = nullptr; | 85 CPDF_Stream* m_pStream = nullptr; |
| 86 CPDF_Dictionary* m_pDict = nullptr; | 86 CPDF_Dictionary* m_pDict = nullptr; |
| 87 UniqueStream m_pOwnedStream; | 87 UniqueStream m_pOwnedStream; |
| 88 UniqueDictionary m_pOwnedDict; | 88 UniqueDictionary m_pOwnedDict; |
| 89 CPDF_Dictionary* m_pOC = nullptr; | 89 CPDF_Dictionary* m_pOC = nullptr; |
| 90 }; | 90 }; |
| 91 | 91 |
| 92 #endif // CORE_FPDFAPI_PAGE_CPDF_IMAGE_H_ | 92 #endif // CORE_FPDFAPI_PAGE_CPDF_IMAGE_H_ |
| OLD | NEW |