Perfectly Clear SDK Documentation  10.7.1.1191
PFCPDFImage.h
Go to the documentation of this file.
1 
2 #ifndef PFCPDFIMAGE_H
3 #define PFCPDFIMAGE_H
4 
5 #ifdef WIN32
6 #if defined(PFCPDFDLL_LIBRARY)
7 # define PFCPDFDLLSHARED_EXPORT __declspec(dllexport)
8 #else
9 # define PFCPDFDLLSHARED_EXPORT __declspec(dllimport)
10 #endif
11 #else
12 # define PFCPDFDLLSHARED_EXPORT
13 #endif
14 
15 #include <cstdint>
16 #include <string>
17 
18 #ifndef WITHOUT_PFCIMAGEFILE
19 class PFCImageFile;
20 #endif
22 
23 namespace PoDoFo {
24  class PdfObject;
25 }
26 
30 class PFCPDFDLLSHARED_EXPORT PFCPDFImage {
33  friend class PFCPDFImageIterator;
34 public:
35  explicit PFCPDFImage();
36  ~PFCPDFImage();
37 
40 #ifndef WITHOUT_PFCIMAGEFILE
42 #endif
43 
47  PoDoFo::PdfObject* pdfObject();
48 
49  int iQuality;
50  bool bConvertToOriginalColorSpace;
51  bool bEmbedOriginalMetadata;
52 
55  uint32_t pdfObjectNumber;
56 
61 
65 
72  void setCompressedBuffer(void* compressedBuffer, int compressedBufferSize, int width, int height);
78  void setCompressedBufferPath(const char* compressedBufferPath, int width, int height);
79 private:
80  PoDoFo::PdfObject* m_pdfObject;
81 
82  uint32_t m_pdfObjectNumber;
83  void* m_compressedBuffer;
84  std::string m_compressedBufferPath;
85 
86  int m_width;
87  int m_height;
88 };
89 
90 #endif //PFCPDFIMAGE_H
PFCPDFImage::imageFile
PFCImageFile * imageFile
Instance to the already expanded image for processing. Use it as you would any other PFCImageFile....
Definition: PFCPDFImage.h:41
PFCPDFImage::pdfObjectNumber
uint32_t pdfObjectNumber
Object number for the image in the PDF document. Can be used to ID a given image.
Definition: PFCPDFImage.h:55
PFCPDFImage
Represents an image extracted from a PDF file, thru use of a PFCPDFImageIterator.
Definition: PFCPDFImage.h:30
PFCPDFImage::compressedBuffer
void * compressedBuffer()
Raw compressed bytes. These bytes are owned by PFCPDImageFile.
PFCPDFImage::setCompressedBufferPath
void setCompressedBufferPath(const char *compressedBufferPath, int width, int height)
Sets the path to compressed buffer on disk.
PFCPDFImage::compressedBufferSize
int compressedBufferSize
Compressed buffer size.
Definition: PFCPDFImage.h:64
PFCPDFImageIterator
PFCPDFImageIterator allows the user to iterate over the PFC-supported images of a PDF file....
Definition: PFCPDFImageIterator.h:28
PFCPDFImage::setCompressedBuffer
void setCompressedBuffer(void *compressedBuffer, int compressedBufferSize, int width, int height)
Sets the raw compressed bytes for the image. The PFCPDFImage doesn't take ownership of the buffer and...
PFCPDFImage::pdfObject
PoDoFo::PdfObject * pdfObject()
For advanced usage the object from which the image was extracted.
PFCImageFile
PFCImageFile Class to encapsulate file handling.
Definition: PFCImageFile.h:72