Qt 6.x
The Qt SDK
Loading...
Searching...
No Matches
QImageData Struct Reference

#include <qimage_p.h>

+ Collaboration diagram for QImageData:

Classes

struct  ImageSizeParameters
 

Public Member Functions

 QImageData ()
 
 ~QImageData ()
 
bool checkForAlphaPixels () const
 
bool convertInPlace (QImage::Format newFormat, Qt::ImageConversionFlags)
 
bool doImageIO (const QImage *image, QImageWriter *io, int quality) const
 

Static Public Member Functions

static QImageDatacreate (const QSize &size, QImage::Format format)
 
static QImageDatacreate (uchar *data, int w, int h, qsizetype bpl, QImage::Format format, bool readOnly, QImageCleanupFunction cleanupFunction=nullptr, void *cleanupInfo=nullptr)
 
static QImageDataget (QImage &img) noexcept
 
static const QImageDataget (const QImage &img) noexcept
 
static ImageSizeParameters calculateImageParameters (qsizetype width, qsizetype height, qsizetype depth)
 

Public Attributes

QAtomicInt ref
 
int width
 
int height
 
int depth
 
qsizetype nbytes
 
qreal devicePixelRatio
 
QList< QRgbcolortable
 
uchardata
 
QImage::Format format
 
qsizetype bytes_per_line
 
int ser_no
 
int detach_no
 
qreal dpmx
 
qreal dpmy
 
QPoint offset
 
uint own_data: 1
 
uint ro_data: 1
 
uint has_alpha_clut: 1
 
uint is_cached: 1
 
QImageCleanupFunction cleanupFunction
 
voidcleanupInfo
 
QMap< QString, QStringtext
 
QPaintEnginepaintEngine
 
QColorSpace colorSpace
 

Detailed Description

Definition at line 29 of file qimage_p.h.

Constructor & Destructor Documentation

◆ QImageData()

QImageData::QImageData ( )

Definition at line 89 of file qimage.cpp.

Referenced by create().

+ Here is the caller graph for this function:

◆ ~QImageData()

QImageData::~QImageData ( )

Definition at line 154 of file qimage.cpp.

References cleanupFunction, cleanupInfo, detach_no, QImagePixmapCleanupHooks::executeImageHooks(), is_cached, own_data, paintEngine, and ser_no.

+ Here is the call graph for this function:

Member Function Documentation

◆ calculateImageParameters()

QImageData::ImageSizeParameters QImageData::calculateImageParameters ( qsizetype  width,
qsizetype  height,
qsizetype  depth 
)
inlinestatic

Definition at line 87 of file qimage_p.h.

References bytes_per_line, depth, qAddOverflow(), and qMulOverflow().

Referenced by QImageIOHandler::allocateImage(), convert_generic_inplace(), convert_generic_inplace_over_rgb64(), and create().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ checkForAlphaPixels()

◆ convertInPlace()

bool QImageData::convertInPlace ( QImage::Format  newFormat,
Qt::ImageConversionFlags  flags 
)

Definition at line 5183 of file qimage.cpp.

References convert_generic_inplace(), convert_generic_inplace_over_rgb64(), format, QImage::Format_Indexed8, own_data, qimage_converter_map, qimage_inplace_converter_map, qPixelLayouts, qt_fpColorPrecision(), and qt_highColorPrecision().

Referenced by QImage::convertToFormat_inplace(), and QImage::invertPixels().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ create() [1/2]

QImageData * QImageData::create ( const QSize size,
QImage::Format  format 
)
static

Creates a new image data. Returns \nullptr if invalid parameters are give or anything else failed.

Referenced by QImage::QImage(), QImage::QImage(), QImage::QImage(), QImage::QImage(), QImage::QImage(), convert_ARGB_PM_to_Indexed8(), convert_ARGB_PM_to_Mono(), and convert_RGB_to_Indexed8().

+ Here is the caller graph for this function:

◆ create() [2/2]

QImageData * QImageData::create ( uchar data,
int  w,
int  h,
qsizetype  bpl,
QImage::Format  format,
bool  readOnly,
QImageCleanupFunction  cleanupFunction = nullptr,
void cleanupInfo = nullptr 
)
static

Definition at line 804 of file qimage.cpp.

References QImageData(), calculateImageParameters(), cleanupFunction, cleanupInfo, d, data, depth, format, height, QImage::NImageFormats, qt_depthForFormat(), and width.

+ Here is the call graph for this function:

◆ doImageIO()

bool QImageData::doImageIO ( const QImage image,
QImageWriter io,
int  quality 
) const

Definition at line 3900 of file qimage.cpp.

References QImageWriter::errorString(), qMin(), qPrintable, qWarning, QImageWriter::setQuality(), and QImageWriter::write().

Referenced by QImage::save(), and QImage::save().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ get() [1/2]

static const QImageData * QImageData::get ( const QImage img)
inlinestaticnoexcept

Definition at line 36 of file qimage_p.h.

◆ get() [2/2]

static QImageData * QImageData::get ( QImage img)
inlinestaticnoexcept

Definition at line 35 of file qimage_p.h.

Referenced by convertWithPalette().

+ Here is the caller graph for this function:

Member Data Documentation

◆ bytes_per_line

◆ cleanupFunction

QImageCleanupFunction QImageData::cleanupFunction

Definition at line 61 of file qimage_p.h.

Referenced by ~QImageData(), and create().

◆ cleanupInfo

void* QImageData::cleanupInfo

Definition at line 62 of file qimage_p.h.

Referenced by ~QImageData(), and create().

◆ colorSpace

◆ colortable

◆ data

◆ depth

◆ detach_no

int QImageData::detach_no

Definition at line 50 of file qimage_p.h.

Referenced by ~QImageData(), QImage::cacheKey(), QImage::detach(), and QImage::detachMetadata().

◆ devicePixelRatio

qreal QImageData::devicePixelRatio

◆ dpmx

qreal QImageData::dpmx

Definition at line 52 of file qimage_p.h.

Referenced by QImage::dotsPerMeterX(), QImage::metric(), and QImage::setDotsPerMeterX().

◆ dpmy

qreal QImageData::dpmy

Definition at line 53 of file qimage_p.h.

Referenced by QImage::dotsPerMeterY(), QImage::metric(), and QImage::setDotsPerMeterY().

◆ format

◆ has_alpha_clut

◆ height

◆ is_cached

uint QImageData::is_cached

Definition at line 59 of file qimage_p.h.

Referenced by ~QImageData(), QImage::detach(), and QImage::detachMetadata().

◆ nbytes

qsizetype QImageData::nbytes

◆ offset

QPoint QImageData::offset

Definition at line 54 of file qimage_p.h.

Referenced by QImage::offset(), and QImage::setOffset().

◆ own_data

uint QImageData::own_data

Definition at line 56 of file qimage_p.h.

Referenced by ~QImageData(), convertInPlace(), and QImage::mirrored_inplace().

◆ paintEngine

QPaintEngine* QImageData::paintEngine

Definition at line 74 of file qimage_p.h.

Referenced by ~QImageData(), QImage::paintEngine(), and QImage::setAlphaChannel().

◆ ref

◆ ro_data

uint QImageData::ro_data

Definition at line 57 of file qimage_p.h.

Referenced by QImage::detach().

◆ ser_no

int QImageData::ser_no

Definition at line 49 of file qimage_p.h.

Referenced by ~QImageData(), and QImage::cacheKey().

◆ text

QMap<QString, QString> QImageData::text

Definition at line 70 of file qimage_p.h.

Referenced by QImage::setText(), QImage::text(), and QImage::textKeys().

◆ width


The documentation for this struct was generated from the following files: