Qt 6.x
The Qt SDK
All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
qimage_p.h File Reference
#include <QtGui/private/qtguiglobal_p.h>
#include <QtGui/qcolorspace.h>
#include <QtGui/qimage.h>
#include <QtCore/private/qnumeric_p.h>
#include <QtCore/qlist.h>
#include <QtCore/qmap.h>
+ Include dependency graph for qimage_p.h:
+ This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Classes

struct  QImageData
 
struct  QImageData::ImageSizeParameters
 

Typedefs

typedef void(* Image_Converter) (QImageData *dest, const QImageData *src, Qt::ImageConversionFlags)
 
typedef bool(* InPlace_Image_Converter) (QImageData *data, Qt::ImageConversionFlags)
 

Functions

void convert_generic (QImageData *dest, const QImageData *src, Qt::ImageConversionFlags)
 
void convert_generic_over_rgb64 (QImageData *dest, const QImageData *src, Qt::ImageConversionFlags)
 
bool convert_generic_inplace (QImageData *data, QImage::Format dst_format, Qt::ImageConversionFlags)
 
bool convert_generic_inplace_over_rgb64 (QImageData *data, QImage::Format dst_format, Qt::ImageConversionFlags)
 
void dither_to_Mono (QImageData *dst, const QImageData *src, Qt::ImageConversionFlags flags, bool fromalpha)
 
const ucharqt_get_bitflip_array ()
 
Q_GUI_EXPORT void qGamma_correct_back_to_linear_cs (QImage *image)
 
int qt_depthForFormat (QImage::Format format)
 
QImage::Format qt_opaqueVersion (QImage::Format format)
 
QImage::Format qt_alphaVersion (QImage::Format format)
 
bool qt_highColorPrecision (QImage::Format format, bool opaque=false)
 
bool qt_fpColorPrecision (QImage::Format format)
 
QImage::Format qt_maybeAlphaVersionWithSameDepth (QImage::Format format)
 
QImage::Format qt_opaqueVersionForPainting (QImage::Format format)
 
QImage::Format qt_alphaVersionForPainting (QImage::Format format)
 
Q_GUI_EXPORT QMap< QString, QStringqt_getImageText (const QImage &image, const QString &description)
 
Q_GUI_EXPORT QMap< QString, QStringqt_getImageTextFromDescription (const QString &description)
 

Variables

Image_Converter qimage_converter_map [QImage::NImageFormats][QImage::NImageFormats]
 
InPlace_Image_Converter qimage_inplace_converter_map [QImage::NImageFormats][QImage::NImageFormats]
 

Typedef Documentation

◆ Image_Converter

typedef void(* Image_Converter) (QImageData *dest, const QImageData *src, Qt::ImageConversionFlags)

Definition at line 117 of file qimage_p.h.

◆ InPlace_Image_Converter

typedef bool(* InPlace_Image_Converter) (QImageData *data, Qt::ImageConversionFlags)

Definition at line 118 of file qimage_p.h.

Function Documentation

◆ convert_generic()

void convert_generic ( QImageData dest,
const QImageData src,
Qt::ImageConversionFlags  flags 
)

◆ convert_generic_inplace()

bool convert_generic_inplace ( QImageData data,
QImage::Format  dst_format,
Qt::ImageConversionFlags  flags 
)

◆ convert_generic_inplace_over_rgb64()

bool convert_generic_inplace_over_rgb64 ( QImageData data,
QImage::Format  dst_format,
Qt::ImageConversionFlags   
)

Definition at line 465 of file qimage_conversions.cpp.

References QSemaphore::acquire(), QPixelLayout::bpp, QPixelLayout::BPP64, BufferSize, QImageData::calculateImageParameters(), QThreadPool::contains(), QThread::currentThread(), QPixelLayout::fetchToRGBA64PM, QImage::Format_Indexed8, QPixelLayout::hasAlphaChannel, i, QPixelLayout::premultiplied, ptr(), Q_ASSERT, qMin(), qPixelLayouts, qStoreFromRGBA64PM, qt_depthForFormat(), QThreadPoolPrivate::qtGuiInstance(), QSemaphore::release(), and QThreadPool::start().

Referenced by QImageData::convertInPlace().

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

◆ convert_generic_over_rgb64()

void convert_generic_over_rgb64 ( QImageData dest,
const QImageData src,
Qt::ImageConversionFlags   
)

Definition at line 227 of file qimage_conversions.cpp.

References QSemaphore::acquire(), QPixelLayout::bpp, QPixelLayout::BPP64, BufferSize, QImageData::bytes_per_line, contains(), QThread::currentThread(), QImageData::data, QPixelLayout::fetchToRGBA64PM, QImageData::format, QImage::Format_Indexed8, i, ptr(), Q_ASSERT, qMin(), qPixelLayouts, qStoreFromRGBA64PM, QThreadPoolPrivate::qtGuiInstance(), QSemaphore::release(), and QThreadPool::start().

Referenced by QImage::convertToFormat_helper().

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

◆ dither_to_Mono()

void dither_to_Mono ( QImageData dst,
const QImageData src,
Qt::ImageConversionFlags  flags,
bool  fromalpha 
)

Definition at line 1612 of file qimage_conversions.cpp.

References Qt::AlphaDither_Mask, bitflip, d, QScopedPointer< T, Cleanup >::data(), Diffuse, Qt::DiffuseAlphaDither, Qt::Dither_Mask, QImage::Format_Mono, QImage::Format_MonoLSB, i, j, Qt::OrderedAlphaDither, Qt::OrderedDither, Q_ASSERT, qGray(), qt_bayer_matrix, and Qt::ThresholdDither.

Referenced by convert_ARGB_PM_to_Mono(), convert_RGB_to_Indexed8(), and convert_X_to_Mono().

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

◆ qGamma_correct_back_to_linear_cs()

Q_GUI_EXPORT void qGamma_correct_back_to_linear_cs ( QImage image)

Definition at line 79 of file qimage_conversions.cpp.

References QGuiApplicationPrivate::colorProfileForA32Text(), QGuiApplicationPrivate::instance(), QRgb, and QColorTrcLut::toLinear().

Referenced by QCoreTextFontEngine::imageForGlyph().

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

◆ qt_alphaVersion()

◆ qt_alphaVersionForPainting()

QImage::Format qt_alphaVersionForPainting ( QImage::Format  format)
inline

Definition at line 377 of file qimage_p.h.

References QImage::Format_ARGB32_Premultiplied, qt_alphaVersion(), and qt_depthForFormat().

Referenced by QRasterPlatformPixmap::createPixmapForImage(), QRasterPlatformPixmap::fill(), and QImage::setAlphaChannel().

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

◆ qt_depthForFormat()

int qt_depthForFormat ( QImage::Format  format)
inline

Definition at line 140 of file qimage_p.h.

References QImage::Format_A2BGR30_Premultiplied, QImage::Format_A2RGB30_Premultiplied, QImage::Format_Alpha8, QImage::Format_ARGB32, QImage::Format_ARGB32_Premultiplied, QImage::Format_ARGB4444_Premultiplied, QImage::Format_ARGB6666_Premultiplied, QImage::Format_ARGB8555_Premultiplied, QImage::Format_ARGB8565_Premultiplied, QImage::Format_BGR30, QImage::Format_BGR888, QImage::Format_Grayscale16, QImage::Format_Grayscale8, QImage::Format_Indexed8, QImage::Format_Invalid, QImage::Format_Mono, QImage::Format_MonoLSB, QImage::Format_RGB16, QImage::Format_RGB30, QImage::Format_RGB32, QImage::Format_RGB444, QImage::Format_RGB555, QImage::Format_RGB666, QImage::Format_RGB888, QImage::Format_RGBA16FPx4, QImage::Format_RGBA16FPx4_Premultiplied, QImage::Format_RGBA32FPx4, QImage::Format_RGBA32FPx4_Premultiplied, QImage::Format_RGBA64, QImage::Format_RGBA64_Premultiplied, QImage::Format_RGBA8888, QImage::Format_RGBA8888_Premultiplied, QImage::Format_RGBX16FPx4, QImage::Format_RGBX32FPx4, QImage::Format_RGBX64, QImage::Format_RGBX8888, and QImage::NImageFormats.

Referenced by QImageIOHandler::allocateImage(), QImage::bitPlaneCount(), QRasterPaintEnginePrivate::blitImage(), convert_generic_inplace(), convert_generic_inplace_over_rgb64(), QImageData::create(), qt_alphaVersionForPainting(), qt_maybeAlphaVersionWithSameDepth(), qt_opaqueVersionForPainting(), QImage::reinterpretAsFormat(), QDistanceField::toImage(), and QSharedImageLoaderPrivate::verifyMem().

+ Here is the caller graph for this function:

◆ qt_fpColorPrecision()

bool qt_fpColorPrecision ( QImage::Format  format)
inline

Definition at line 346 of file qimage_p.h.

References QImage::Format_RGBA16FPx4, QImage::Format_RGBA16FPx4_Premultiplied, QImage::Format_RGBA32FPx4, QImage::Format_RGBA32FPx4_Premultiplied, QImage::Format_RGBX16FPx4, and QImage::Format_RGBX32FPx4.

Referenced by QImage::applyColorTransform(), QImageData::convertInPlace(), QImage::convertToFormat_helper(), and qSmoothScaleImage().

+ Here is the caller graph for this function:

◆ qt_get_bitflip_array()

const uchar * qt_get_bitflip_array ( )

Definition at line 74 of file qimage_conversions.cpp.

References bitflip.

Referenced by do_mirror().

+ Here is the caller graph for this function:

◆ qt_getImageText()

Q_GUI_EXPORT QMap< QString, QString > qt_getImageText ( const QImage image,
const QString description 
)

Definition at line 5753 of file qimage.cpp.

References QString::contains(), QString::insert(), qt_getImageTextFromDescription(), and text.

Referenced by set_text(), and set_text().

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

◆ qt_getImageTextFromDescription()

Q_GUI_EXPORT QMap< QString, QString > qt_getImageTextFromDescription ( const QString description)

Definition at line 5764 of file qimage.cpp.

References QString::insert(), QString::left(), QString::split(), and text.

Referenced by QImageReaderPrivate::getText(), and qt_getImageText().

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

◆ qt_highColorPrecision()

◆ qt_maybeAlphaVersionWithSameDepth()

QImage::Format qt_maybeAlphaVersionWithSameDepth ( QImage::Format  format)
inline

Definition at line 362 of file qimage_p.h.

References qt_alphaVersion(), and qt_depthForFormat().

Referenced by QRasterPaintEnginePrivate::canUseImageBlitting(), and QWindowsBackingStore::resize().

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

◆ qt_opaqueVersion()

◆ qt_opaqueVersionForPainting()

QImage::Format qt_opaqueVersionForPainting ( QImage::Format  format)
inline

Definition at line 368 of file qimage_p.h.

References QImage::Format_RGB32, qt_depthForFormat(), and qt_opaqueVersion().

Referenced by QRasterPlatformPixmap::createPixmapForImage().

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

Variable Documentation

◆ qimage_converter_map

◆ qimage_inplace_converter_map