5#include <qpa/qplatformpixmap.h>
6#include <qpa/qplatformintegration.h>
11#include <private/qguiapplication_p.h>
152 if (
image.color(0) == c0 &&
image.color(1) == c1) {
153 image.invertPixels();
154 image.setColor(0, c1);
155 image.setColor(1, c0);
217 int bytesPerLine = (
size.width() + 7) / 8;
218 for (
int y = 0;
y <
size.height(); ++
y)
219 memcpy(
image.scanLine(
y),
bits + bytesPerLine *
y, bytesPerLine);
238 }
else if (
pixmap.depth() == 1) {
240 if (
pixmap.paintingActive()) {
251#if QT_DEPRECATED_SINCE(6, 0)
static QBitmap fromImage(const QImage &image, Qt::ImageConversionFlags flags=Qt::AutoColor)
Returns a copy of the given image converted to a bitmap using the specified image conversion flags.
QBitmap()
Constructs a null bitmap.
QBitmap transformed(const QTransform &matrix) const
Returns a copy of this bitmap, transformed according to the given matrix.
static QBitmap fromData(const QSize &size, const uchar *bits, QImage::Format monoFormat=QImage::Format_MonoLSB)
Constructs a bitmap with the given size, and sets the contents to the bits supplied.
static QBitmap fromPixmap(const QPixmap &pixmap)
Returns a copy of the given pixmap converted to a bitmap.
The QColor class provides colors based on RGB, HSV or CMYK values.
QRgb rgb() const noexcept
Returns the RGB value of the color.
static QPlatformIntegration * platformIntegration()
Format
The following image formats are available in Qt.
Returns a copy of the pixmap that is transformed using the given transformation transform and transfo...
bool load(const QString &fileName, const char *format=nullptr, Qt::ImageConversionFlags flags=Qt::AutoColor)
Loads a pixmap from the file with the given fileName.
QPixmap transformed(const QTransform &, Qt::TransformationMode mode=Qt::FastTransformation) const
QPixmap & operator=(const QPixmap &)
Assigns the given pixmap to this pixmap and returns a reference to this pixmap.
\macro QT_RESTRICTED_CAST_FROM_ASCII
static auto fromValue(T &&value) noexcept(std::is_nothrow_copy_constructible_v< T > &&Private::CanUseInternalSpace< T >) -> std::enable_if_t< std::conjunction_v< std::is_copy_constructible< T >, std::is_destructible< T > >, QVariant >
Combined button and popup list for selecting options.
static QBitmap makeBitmap(QImage &&image, Qt::ImageConversionFlags flags)
GLfloat GLfloat GLfloat w
[0]
GLenum GLuint GLintptr GLsizeiptr size
[1]
GLint GLsizei GLsizei GLenum GLenum GLsizei void * data
GLint GLsizei GLsizei GLenum format
GLfloat GLfloat GLfloat GLfloat h
GLenum GLint GLenum GLsizei GLsizei GLsizei GLint GLsizei const void * bits
QT_BEGIN_NAMESPACE typedef unsigned int QRgb