mirror of
https://bitbucket.org/smil3y/katie.git
synced 2025-02-25 03:12:56 +00:00
use QImage::Format_ARGB32_Premultiplied image format for raster pixmaps unless pixel type is bitmap
Signed-off-by: Ivailo Monev <xakepa10@gmail.com>
This commit is contained in:
parent
73619d7898
commit
5f61f29f3c
1 changed files with 3 additions and 6 deletions
|
@ -50,11 +50,10 @@ QPixmapData *QRasterPixmapData::createCompatiblePixmapData() const
|
|||
|
||||
void QRasterPixmapData::resize(int width, int height)
|
||||
{
|
||||
QImage::Format format;
|
||||
if (pixelType() == BitmapType)
|
||||
QImage::Format format = QImage::Format_ARGB32_Premultiplied;
|
||||
if (pixelType() == BitmapType) {
|
||||
format = QImage::Format_MonoLSB;
|
||||
else
|
||||
format = QImage::systemFormat();
|
||||
}
|
||||
|
||||
image = QImage(width, height, format);
|
||||
w = width;
|
||||
|
@ -89,8 +88,6 @@ void QRasterPixmapData::fromImage(const QImage &sourceImage,
|
|||
QImage::Format format = QImage::Format_ARGB32_Premultiplied;
|
||||
if (pixelType() == BitmapType) {
|
||||
format = QImage::Format_MonoLSB;
|
||||
} else if ((flags & Qt::NoOpaqueDetection) == 0 && !sourceImage.d->checkForAlphaPixels()) {
|
||||
format = QImage::systemFormat();
|
||||
}
|
||||
|
||||
image = sourceImage.convertToFormat(format);
|
||||
|
|
Loading…
Add table
Reference in a new issue