10#include "PdfXObject.h"
12#include "PdfColorSpace.h"
14#ifdef PODOFO_HAVE_JPEG_LIB
15struct jpeg_decompress_struct;
26enum class PdfImageOrientation : uint8_t
39struct PODOFO_API PdfImageInfo final
43 nullable<PdfFilterList> Filters;
44 unsigned char BitsPerComponent = 0;
45 PdfColorSpaceInitializer ColorSpace;
46 std::vector<double> DecodeArray;
47 PdfImageOrientation Orientation = PdfImageOrientation::TopLeft;
56struct PODOFO_API PdfImageLoadParams final
58 unsigned ImageIndex = 0;
59 PdfImageLoadFlags Flags = PdfImageLoadFlags::None;
93 bool TryFetchRawImageInfo(PdfImageInfo&
info);
143 PdfImageInfo Load(
const std::string_view&
filepath,
const PdfImageLoadParams&
params = { });
170 void SetInterpolate(
bool value);
172 Rect GetRect()
const override;
190 const PdfXObjectForm* GetForm()
const override;
201#ifdef PODOFO_HAVE_JPEG_LIB
216#ifdef PODOFO_HAVE_TIFF_LIB
230#ifdef PODOFO_HAVE_PNG_LIB
248 std::unique_ptr<PdfXObjectForm> getTransformation(PdfImageOrientation
orientation);
254 unsigned char m_BitsPerComponent;
255 std::unique_ptr<PdfXObjectForm> m_Transformation;
An interface for writing blocks of data to a data source.
Definition OutputStream.h:18
This class represents a PdfArray Use it for all arrays that are written to a PDF file.
Definition PdfArray.h:81
A class that implements methods to sample colors from a scanline buffer.
Definition PdfColorSpaceFilter.h:32
PdfDocument is the core interface for working with PDF documents.
Definition PdfDocument.h:111
A PdfImage object is needed when ever you want to embed an image file into a PDF document.
Definition PdfImage.h:71
unsigned GetWidth() const
Get the width of the image when drawn in PDF units.
Definition PdfImage.h:182
const PdfColorSpaceFilter & GetColorSpace() const
Get the color space of the image.
Definition PdfImage.h:177
unsigned GetHeight() const
Get the height of the image when drawn in PDF units.
Definition PdfImage.h:187
This class represents a PDF indirect Object in memory.
Definition PdfObject.h:35
A XObject is a content stream with several drawing commands and data which can be used throughout a P...
Definition PdfXObject.h:31
An normalized rectangle defined by position (left-bottom) and size.
Definition Rect.h:20
Convenient type for char array storage and/or buffer with std::string compatibility.
Definition basetypes.h:38
SPDX-FileCopyrightText: (C) 2022 Francesco Pretto ceztko@gmail.com SPDX-License-Identifier: LGPL-2....
Definition basetypes.h:16
PdfPixelFormat
Definition PdfDeclarations.h:375
std::shared_ptr< const PdfColorSpaceFilter > PdfColorSpaceFilterPtr
Convenience alias for a constant PdfColorSpaceFilter shared ptr.
Definition PdfColorSpaceFilter.h:85
mspan< char > bufferspan
Convenient writable char buffer span.
Definition basetypes.h:23
@ None
Do not add a default appearrance.
PdfImageLoadFlags
Definition PdfImage.h:51
@ SkipTransform
Skip applying orientation transform.
PdfExportFormat
Definition PdfDeclarations.h:241
cspan< char > bufferview
Convenient read-only char buffer span.
Definition basetypes.h:19