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
qimage_p.h File Reference

(25c96d547b4563cbfedcec6093d68116148d8599)

#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 <QtCore/qttypetraits.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)
 
QImage::Format qt_maybeDataCompatibleOpaqueVersion (QImage::Format format)
 
constexpr QImage::Format qt_toUnpremultipliedFormat (QImage::Format format)
 
constexpr QImage::Format qt_toPremultipliedFormat (QImage::Format format)
 
bool qt_highColorPrecision (QImage::Format format, bool opaque=false)
 
bool qt_fpColorPrecision (QImage::Format format)
 
QColorSpace::ColorModel qt_csColorData (QPixelFormat::ColorModel format)
 
bool qt_compatibleColorModel (QPixelFormat::ColorModel data, QColorSpace::ColorModel cs)
 
QImage::Format qt_maybeDataCompatibleAlphaVersion (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 119 of file qimage_p.h.

◆ InPlace_Image_Converter

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

Definition at line 120 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 466 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(), qt_toPremultipliedFormat(), 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 228 of file qimage_conversions.cpp.

References QSemaphore::acquire(), 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 1611 of file qimage_conversions.cpp.

References Qt::AlphaDither_Mask, bitflip, d, 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 80 of file qimage_conversions.cpp.

References 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 543 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_compatibleColorModel()

bool qt_compatibleColorModel ( QPixelFormat::ColorModel data,
QColorSpace::ColorModel cs )
inline

Definition at line 459 of file qimage_p.h.

References QPixelFormat::Alpha, QColorSpace::Gray, qt_csColorData(), and QColorSpace::Undefined.

Referenced by QImage::applyColorTransform(), QImage::colorTransformed(), QImage::colorTransformed(), QImage::colorTransformed(), QImage::convertedToColorSpace(), QImage::convertToColorSpace(), QImage::convertToColorSpace(), and QImage::setColorSpace().

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

◆ qt_csColorData()

QColorSpace::ColorModel qt_csColorData ( QPixelFormat::ColorModel format)
inline

Definition at line 440 of file qimage_p.h.

References QPixelFormat::Alpha, QPixelFormat::BGR, QPixelFormat::CMYK, QColorSpace::Cmyk, QColorSpace::Gray, QPixelFormat::Grayscale, QPixelFormat::Indexed, QPixelFormat::RGB, QColorSpace::Rgb, and QColorSpace::Undefined.

Referenced by QImage::colorTransformed(), and qt_compatibleColorModel().

+ Here is the caller graph for this function:

◆ qt_depthForFormat()

int qt_depthForFormat ( QImage::Format format)
inline

Definition at line 142 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_CMYK8888, 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_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 424 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(), QImage::colorTransformed(), 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 75 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 6424 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 6435 of file qimage.cpp.

References QString::indexOf(), QString::insert(), QString::left(), text, and QString::tokenize().

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_maybeDataCompatibleAlphaVersion()

◆ qt_maybeDataCompatibleOpaqueVersion()

◆ qt_opaqueVersion()

◆ qt_opaqueVersionForPainting()

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

Definition at line 534 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:

◆ qt_toPremultipliedFormat()

constexpr QImage::Format qt_toPremultipliedFormat ( QImage::Format format)
constexpr

Definition at line 389 of file qimage_p.h.

References qToUnderlying().

Referenced by convert_ARGB32_to_RGBA64(), convert_generic(), convert_generic_inplace(), and convert_generic_inplace_over_rgb64().

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

◆ qt_toUnpremultipliedFormat()

constexpr QImage::Format qt_toUnpremultipliedFormat ( QImage::Format format)
constexpr

Definition at line 382 of file qimage_p.h.

References qToUnderlying().

+ Here is the call graph for this function:

Variable Documentation

◆ qimage_converter_map

◆ qimage_inplace_converter_map