1009 if (img.
depth() != 32)
1014 uint cgflags = kCGImageAlphaNone;
1015 switch (image->
format()) {
1017 cgflags = kCGImageAlphaPremultipliedFirst;
1020 cgflags = kCGImageAlphaFirst;
1023 cgflags = kCGImageAlphaNoneSkipFirst;
1027 #if defined(kCGBitmapByteOrder32Host) //only needed because CGImage.h added symbols in the minor version 1028 cgflags |= kCGBitmapByteOrder32Host;
1031 static_cast<const QImage *>(image)->bits(),
1036 return CGImageCreate(image->
width(), image->
height(), 8, 32,
1039 cgflags, dataProvider, 0,
false, kCGRenderingIntentDefault);
static CGColorSpaceRef macGenericColorSpace()
int byteCount() const
Returns the number of bytes occupied by the image data.
static void drawImageReleaseData(void *info, const void *, size_t)
int bytesPerLine() const
Returns the number of bytes per image scanline.
Format format() const
Returns the format of the image.
The QImage class provides a hardware-independent image representation that allows direct access to th...
int depth() const
Returns the depth of the image.
int width() const
Returns the width of the image.
QImage convertToFormat(Format f, Qt::ImageConversionFlags flags=Qt::AutoColor) const Q_REQUIRED_RESULT
Returns a copy of the image in the given format.
int height() const
Returns the height of the image.