Qt
Internal/Contributor docs for the Qt SDK. <b>Note:</b> These are NOT official API docs; those are found <a href='https://doc.qt.io/'>here</a>.
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 31 of file qimage_p.h.

Constructor & Destructor Documentation

◆ QImageData()

QImageData::QImageData ( )

Definition at line 91 of file qimage.cpp.

Referenced by create().

+ Here is the caller graph for this function:

◆ ~QImageData()

QImageData::~QImageData ( )

Definition at line 156 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 89 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 5850 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().

+ Here is the call 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 829 of file qimage.cpp.

References QImageData(), calculateImageParameters(), cleanupFunction, cleanupInfo, d, data, depth, format, height, QImage::NImageFormats, qt_depthForFormat(), QBasicAtomicInteger< T >::ref(), ref, 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 3926 of file qimage.cpp.

References qMin(), qPrintable, and qWarning.

+ Here is the call graph for this function:

◆ get() [1/2]

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

Definition at line 38 of file qimage_p.h.

◆ get() [2/2]

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

Definition at line 37 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 63 of file qimage_p.h.

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

◆ cleanupInfo

void* QImageData::cleanupInfo

Definition at line 64 of file qimage_p.h.

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

◆ colorSpace

QColorSpace QImageData::colorSpace

Definition at line 78 of file qimage_p.h.

◆ colortable

◆ data

◆ depth

int QImageData::depth

Definition at line 44 of file qimage_p.h.

Referenced by calculateImageParameters(), and create().

◆ detach_no

int QImageData::detach_no

Definition at line 52 of file qimage_p.h.

Referenced by ~QImageData().

◆ devicePixelRatio

qreal QImageData::devicePixelRatio

Definition at line 46 of file qimage_p.h.

◆ dpmx

qreal QImageData::dpmx

Definition at line 54 of file qimage_p.h.

◆ dpmy

qreal QImageData::dpmy

Definition at line 55 of file qimage_p.h.

◆ format

◆ has_alpha_clut

uint QImageData::has_alpha_clut

Definition at line 60 of file qimage_p.h.

Referenced by checkForAlphaPixels(), and convert_Mono_to_Indexed8().

◆ height

◆ is_cached

uint QImageData::is_cached

Definition at line 61 of file qimage_p.h.

Referenced by ~QImageData().

◆ nbytes

qsizetype QImageData::nbytes

Definition at line 45 of file qimage_p.h.

Referenced by swap_bit_order().

◆ offset

QPoint QImageData::offset

Definition at line 56 of file qimage_p.h.

◆ own_data

uint QImageData::own_data

Definition at line 58 of file qimage_p.h.

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

◆ paintEngine

QPaintEngine* QImageData::paintEngine

Definition at line 76 of file qimage_p.h.

Referenced by QPixmapCacheEntry::QPixmapCacheEntry(), and ~QImageData().

◆ ref

QAtomicInt QImageData::ref

Definition at line 40 of file qimage_p.h.

Referenced by create().

◆ ro_data

uint QImageData::ro_data

Definition at line 59 of file qimage_p.h.

◆ ser_no

int QImageData::ser_no

Definition at line 51 of file qimage_p.h.

Referenced by ~QImageData().

◆ text

QMap<QString, QString> QImageData::text

Definition at line 72 of file qimage_p.h.

◆ width


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