KItinerary
pdfimage.cpp
28 // barcode images for SNCF and Renfe for example are anti-aliased, so we cannot simply filter for black or white
30 return std::abs(rgb.r - rgb.g) > Threshold || std::abs(rgb.r - rgb.b) > Threshold || std::abs(rgb.g - rgb.b) > Threshold;
36 auto img = QImage(m_sourceWidth, m_sourceHeight, QImage::Format_Mono); // TODO implicit Format_Grayscale8 conversion
55 auto img = QImage(m_sourceWidth, m_sourceHeight, (m_loadingHints & PdfImage::ConvertToGrayscaleHint) ? QImage::Format_Grayscale8 : m_format);
57 std::unique_ptr<ImageStream> imgStream(new ImageStream(str, m_sourceWidth, bytesPerPixel, colorMap->getBits()));
216 return d->m_format != QImage::Format_Invalid && (d->m_width != d->m_sourceWidth || d->m_height != d->m_sourceHeight);
PDF object reference for an image, with the ability to address attached masks as well.
Definition pdfimage.h:43
@ AbortOnColorHint
Abort loading when encountering a non black/white pixel, as a shortcut for barcode detection.
Definition pdfimage.h:102
@ ConvertToGrayscaleHint
Convert to QImage::Format_Grayscale8 during loading. More efficient than converting later if all you ...
Definition pdfimage.h:103
QImage image() const
The source image without display transformations applied.
Definition pdfimage.cpp:183
int pathElementsCount() const
If this is a vector image, this returns the number of vector path elemets.
Definition pdfimage.cpp:209
QTransform transform() const
Transformation from source image to final size/position on the page.
Definition pdfimage.cpp:173
bool isVectorImage() const
Returns whether this is a raster or vector image.
Definition pdfimage.cpp:204
bool hasAspectRatioTransform() const
Returns true if this image has an aspect-ratio changing transform.
Definition pdfimage.cpp:214
QImage applyAspectRatioTransform(const QImage &image) const
Applies the aspect ratio changing part of the transform to the given image (which typically should be...
Definition pdfimage.cpp:219
PdfImageRef objectId() const
PDF-internal unique identifier of this image.
Definition pdfimage.cpp:199
QAction * load(const QObject *recvr, const char *slot, QObject *parent)
Classes for reservation/travel data models, data extraction and data augmentation.
Definition berelement.h:17
Format_Mono
QImage scaled(const QSize &size, Qt::AspectRatioMode aspectRatioMode, Qt::TransformationMode transformMode) const const
gray
This file is part of the KDE documentation.
Documentation copyright © 1996-2024 The KDE developers.
Generated on Fri Oct 4 2024 12:00:26 by doxygen 1.12.0 written by Dimitri van Heesch, © 1997-2006
Documentation copyright © 1996-2024 The KDE developers.
Generated on Fri Oct 4 2024 12:00:26 by doxygen 1.12.0 written by Dimitri van Heesch, © 1997-2006
KDE's Doxygen guidelines are available online.