From 4ba9ae2cdcde1630f3b0ced9ebbf54a71924a544 Mon Sep 17 00:00:00 2001 From: zeljko Date: Sat, 25 Jan 2014 09:46:29 +0000 Subject: [PATCH] Qt: fixed conversion of QImage::RGB32 without mask. issue #25590 git-svn-id: trunk@43790 - --- lcl/interfaces/qt/qtobjects.pas | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/lcl/interfaces/qt/qtobjects.pas b/lcl/interfaces/qt/qtobjects.pas index afd2a8ebd6..08a01df191 100644 --- a/lcl/interfaces/qt/qtobjects.pas +++ b/lcl/interfaces/qt/qtobjects.pas @@ -3524,8 +3524,10 @@ begin {Workaround: we must convert image to ARGB32 , since we can get strange results with RGB32 images on Linux and Win32 if DstRect <> sourceRect. Explanation: Look at #11713 linux & win screenshoots. - Note: This is slower operation than QImage_scaled() we used before.} - if not EqualRect(LocalRect, sourceRect^) and + Note: This is slower operation than QImage_scaled() we used before. + Issue #25590 - check if we are RGB32 and mask is nil, so make conversion + too.} + if (not EqualRect(LocalRect, sourceRect^) or (Mask = nil)) and (QImage_format(Image) = QImageFormat_RGB32) then begin