10#include "PdfColorSpace.h"
12#ifdef PODOFO_HAVE_JPEG_LIB
13struct jpeg_decompress_struct;
24enum class PdfImageOrientation : uint8_t
37struct PODOFO_API PdfImageInfo final
41 nullable<PdfFilterList> Filters;
42 unsigned char BitsPerComponent = 0;
43 PdfColorSpaceInitializer ColorSpace;
44 std::vector<double> DecodeArray;
45 PdfImageOrientation Orientation = PdfImageOrientation::TopLeft;
54struct PODOFO_API PdfImageLoadParams final
56 unsigned ImageIndex = 0;
57 PdfImageLoadFlags Flags = PdfImageLoadFlags::None;
88 bool TryFetchRawImageInfo(PdfImageInfo&
info);
133 PdfImageInfo Load(
const std::string_view&
filepath,
const PdfImageLoadParams&
params = { });
157 void SetInterpolate(
bool value);
159 Rect GetRect()
const override;
174 const PdfXObjectForm* GetForm()
const override;
184#ifdef PODOFO_HAVE_JPEG_LIB
197#ifdef PODOFO_HAVE_TIFF_LIB
209#ifdef PODOFO_HAVE_PNG_LIB
225 std::unique_ptr<PdfXObjectForm> getTransformation(PdfImageOrientation
orientation);
231 unsigned char m_BitsPerComponent;
232 std::unique_ptr<PdfXObjectForm> m_Transformation;
An interface for writing blocks of data to a data source.
Definition OutputStream.h:15
This class represents a PdfArray Use it for all arrays that are written to a PDF file.
Definition PdfArray.h:76
A class that implements methods to sample colors from a scanline buffer.
Definition PdfColorSpaceFilter.h:27
PdfDocument is the core interface for working with PDF documents.
Definition PdfDocument.h:108
A PdfImage object is needed when ever you want to embed an image file into a PDF document.
Definition PdfImage.h:68
unsigned GetWidth() const
Get the width of the image when drawn in PDF units.
Definition PdfImage.h:167
const PdfColorSpaceFilter & GetColorSpace() const
Get the color space of the image.
Definition PdfImage.h:163
unsigned GetHeight() const
Get the height of the image when drawn in PDF units.
Definition PdfImage.h:171
This class represents a PDF indirect Object in memory.
Definition PdfObject.h:31
A XObject is a content stream with several drawing commands and data which can be used throughout a P...
Definition PdfXObject.h:28
An normalized rectangle defined by position (left-bottom) and size.
Definition Rect.h:17
Convenient type for char array storage and/or buffer with std::string compatibility.
Definition basetypes.h:30
All classes, functions, types and enums of PoDoFo are members of these namespace.
Definition basetypes.h:13
PdfPixelFormat
Definition PdfDeclarations.h:349
std::shared_ptr< const PdfColorSpaceFilter > PdfColorSpaceFilterPtr
Convenience alias for a constant PdfColorSpaceFilter shared ptr.
Definition PdfColorSpaceFilter.h:71
mspan< char > bufferspan
Convenient writable char buffer span.
Definition basetypes.h:18
@ None
Do not add a default appearance.
PdfImageLoadFlags
Definition PdfImage.h:49
@ SkipTransform
Skip applying orientation transform.
PdfExportFormat
Definition PdfDeclarations.h:224
cspan< char > bufferview
Convenient read-only char buffer span.
Definition basetypes.h:15