Avoid trying convert to RGB32(ARGB32) when image already RGB32 while writing XPM image
"sourceImage.format() != QImage::Format_RGB32 || sourceImage.format() != QImage::Format_ARGB32 || sourceImage.format() != QImage::Format_ARGB32_Premultiplied)" This condition always "true". Change-Id: I67b3dfac135985a75bcd697b4c1a84ec3c0b66f5 Reviewed-by: Allan Sandfeld Jensen <allan.jensen@digia.com>
This commit is contained in:
parent
e5f3a25253
commit
8d9957c671
@ -1094,7 +1094,7 @@ static bool write_xpm_image(const QImage &sourceImage, QIODevice *device, const
|
||||
return false;
|
||||
|
||||
QImage image;
|
||||
if (sourceImage.format() != QImage::Format_RGB32 || sourceImage.format() != QImage::Format_ARGB32 || sourceImage.format() != QImage::Format_ARGB32_Premultiplied)
|
||||
if (sourceImage.format() != QImage::Format_RGB32 && sourceImage.format() != QImage::Format_ARGB32 && sourceImage.format() != QImage::Format_ARGB32_Premultiplied)
|
||||
image = sourceImage.convertToFormat(QImage::Format_RGB32);
|
||||
else
|
||||
image = sourceImage;
|
||||
|
Loading…
Reference in New Issue
Block a user