43 #include <QtGui/qtguiglobal.h>
44 #include <QtGui/qcolor.h>
45 #include <QtGui/qrgb.h>
46 #include <QtGui/qpaintdevice.h>
47 #include <QtGui/qpixelformat.h>
48 #include <QtGui/qtransform.h>
49 #include <QtCore/qbytearray.h>
50 #include <QtCore/qbytearrayview.h>
51 #include <QtCore/qrect.h>
52 #include <QtCore/qstring.h>
53 #include <QtCore/qcontainerfwd.h>
55 #if defined(Q_OS_DARWIN) || defined(Q_QDOC)
128 #ifndef QT_NO_IMAGEFORMAT_XPM
129 explicit QImage(
const char *
const xpm[]);
142 { qt_ptr_swap(
d,
other.d); }
152 bool isDetached()
const;
161 {
return convertToFormat_helper(
f,
flags); }
164 if (convertToFormat_inplace(
f,
flags))
165 return std::move(*
this);
167 return convertToFormat_helper(
f,
flags);
172 bool reinterpretAsFormat(Format
f);
174 {
return convertToFormat(
f,
flags); }
176 {
return convertToFormat(
f,
flags); }
186 int bitPlaneCount()
const;
190 void setColorCount(
int);
192 bool allGray()
const;
193 bool isGrayscale()
const;
197 const uchar *constBits()
const;
201 uchar *scanLine(
int);
202 const uchar *scanLine(
int)
const;
203 const uchar *constScanLine(
int)
const;
206 bool valid(
int x,
int y)
const;
207 bool valid(
const QPoint &pt)
const;
209 int pixelIndex(
int x,
int y)
const;
210 int pixelIndex(
const QPoint &pt)
const;
212 QRgb pixel(
int x,
int y)
const;
215 void setPixel(
int x,
int y,
uint index_or_rgb);
216 void setPixel(
const QPoint &pt,
uint index_or_rgb);
218 QColor pixelColor(
int x,
int y)
const;
221 void setPixelColor(
int x,
int y,
const QColor &
c);
228 void setDevicePixelRatio(
qreal scaleFactor);
229 QSizeF deviceIndependentSize()
const;
236 bool hasAlphaChannel()
const;
237 void setAlphaChannel(
const QImage &alphaChannel);
239 #ifndef QT_NO_IMAGE_HEURISTIC_MASK
240 [[nodiscard]]
QImage createHeuristicMask(
bool clipTight =
true)
const;
255 {
return mirrored_helper(horizontally, vertically); }
256 [[nodiscard]]
QImage mirrored(
bool horizontally =
false,
bool vertically =
true) &&
257 { mirrored_inplace(horizontally, vertically);
return std::move(*
this); }
259 {
return rgbSwapped_helper(); }
261 { rgbSwapped_inplace();
return std::move(*
this); }
262 void mirror(
bool horizontally =
false,
bool vertically =
true)
263 { mirrored_inplace(horizontally, vertically); }
265 { rgbSwapped_inplace(); }
266 void invertPixels(InvertMode = InvertRgb);
295 int dotsPerMeterX()
const;
296 int dotsPerMeterY()
const;
297 void setDotsPerMeterX(
int);
298 void setDotsPerMeterY(
int);
300 void setOffset(
const QPoint&);
311 #if defined(Q_OS_DARWIN) || defined(Q_QDOC)
314 #if defined(Q_OS_WIN) || defined(Q_QDOC)
315 HBITMAP toHBITMAP()
const;
317 static QImage fromHBITMAP(HBITMAP hbitmap);
322 virtual int metric(PaintDeviceMetric metric)
const override;
323 QImage mirrored_helper(
bool horizontal,
bool vertical)
const;
324 QImage rgbSwapped_helper()
const;
325 void mirrored_inplace(
bool horizontal,
bool vertical);
326 void rgbSwapped_inplace();
327 QImage convertToFormat_helper(Format
format, Qt::ImageConversionFlags
flags)
const;
328 bool convertToFormat_inplace(Format
format, Qt::ImageConversionFlags
flags);
329 QImage smoothScaled(
int w,
int h)
const;
357 #if !defined(QT_NO_DATASTREAM)
362 #ifndef QT_NO_DEBUG_STREAM
small capitals from c petite p scientific i
[1]
The QByteArray class provides an array of bytes.
The QColor class provides colors based on RGB, HSV or CMYK values.
The QColorSpace class provides a color space abstraction.
The QDataStream class provides serialization of binary data to a QIODevice.
operator>>(QDataStream &ds, qfloat16 &f)
operator<<(QDataStream &ds, qfloat16 f)
The QDebug class provides an output stream for debugging information.
The QIODevice class is the base interface class of all I/O devices in Qt.
The QImage class provides a hardware-independent image representation that allows direct access to th...
void mirror(bool horizontally=false, bool vertically=true)
QImage scaled(int w, int h, Qt::AspectRatioMode aspectMode=Qt::IgnoreAspectRatio, Qt::TransformationMode mode=Qt::FastTransformation) const
void setPixel(int x, int y, uint index_or_rgb)
void setPixelColor(int x, int y, const QColor &c)
QRgb pixel(int x, int y) const
bool loadFromData(const QByteArray &data, const char *format=nullptr)
@ Format_RGBA32FPx4_Premultiplied
@ Format_RGBA64_Premultiplied
@ Format_ARGB6666_Premultiplied
@ Format_ARGB8555_Premultiplied
@ Format_RGBA8888_Premultiplied
@ Format_ARGB8565_Premultiplied
@ Format_RGBA16FPx4_Premultiplied
@ Format_A2BGR30_Premultiplied
@ Format_ARGB32_Premultiplied
@ Format_A2RGB30_Premultiplied
@ Format_ARGB4444_Premultiplied
QImage convertedTo(Format f, Qt::ImageConversionFlags flags=Qt::AutoColor) &&
QImage mirrored(bool horizontally=false, bool vertically=true) &&
QImage mirrored(bool horizontally=false, bool vertically=true) const &
QColor pixelColor(int x, int y) const
QImage rgbSwapped() const &
static QImage fromData(const QByteArray &data, const char *format=nullptr)
QImage(QImage &&other) noexcept
QImage convertToFormat(Format f, Qt::ImageConversionFlags flags=Qt::AutoColor) &&
int pixelIndex(int x, int y) const
QImage convertedTo(Format f, Qt::ImageConversionFlags flags=Qt::AutoColor) const &
QImage copy(int x, int y, int w, int h) const
QImage convertToFormat(Format f, Qt::ImageConversionFlags flags=Qt::AutoColor) const &
virtual QPaintEngine * paintEngine() const =0
qreal devicePixelRatio() const
virtual int devType() const
virtual int metric(PaintDeviceMetric metric) const
The QPaintEngine class provides an abstract definition of how QPainter draws to a given device on a g...
The QPoint class defines a point in the plane using integer precision.
constexpr int x() const noexcept
constexpr int y() const noexcept
The QRect class defines a rectangle in the plane using integer precision.
The QSizeF class defines the size of a two-dimensional object using floating point precision.
The QSize class defines the size of a two-dimensional object using integer point precision.
The QString class provides a Unicode character string.
The QStringList class provides a list of strings.
The QVariant class acts like a union for the most common Qt data types.
auto it unsigned count const
#define Q_DECL_CF_RETURNS_RETAINED
constexpr bool operator!=(const timespec &t1, const timespec &t2)
EGLOutputLayerEXT EGLint EGLAttrib value
QT_BEGIN_INCLUDE_NAMESPACE typedef unsigned char uchar
QT_END_INCLUDE_NAMESPACE typedef double qreal
#define QT_MOVE_ASSIGNMENT_OPERATOR_IMPL_VIA_MOVE_AND_SWAP(Class)
void(* QImageCleanupFunction)(void *)
Q_FORWARD_DECLARE_MUTABLE_CG_TYPE(CGContext)
bool operator==(const QMakeBaseKey &one, const QMakeBaseKey &two)
GLint GLint GLint GLint GLint x
[0]
GLfloat GLfloat GLfloat w
[0]
GLint GLsizei GLsizei height
GLenum GLuint GLintptr GLsizeiptr size
[1]
GLenum GLuint GLenum GLsizei const GLchar * buf
GLint GLsizei GLsizei GLenum GLenum GLsizei void * data
GLenum GLuint GLintptr offset
GLint GLint GLint GLint GLint GLint GLint GLbitfield mask
GLint GLsizei GLsizei GLenum format
GLfloat GLfloat GLfloat GLfloat h
GLuint GLenum GLenum transform
QT_BEGIN_NAMESPACE typedef unsigned int QRgb
#define Q_DECLARE_SHARED(TYPE)
QImage scaled(const QImage &image)
[0]
myFilter setColor(QColor(128, 0, 0))