Fix QPixelFormat definition of QImage::Format_ARGB4444_Premultiplied

The pixel format claimed to have alpha last, but that's not what the
name would indicate, nor what the logic in QImage::checkForAlphaPixels
assumes.

Discovered when generating CGImageRefs from the pixel format definition,
and seeing obviously wrong pixels values in the written PNG.

Pick-to: 6.8 6.5
Change-Id: Iac8c9961b6e46d4627a579a2129e29b95a4e3343
Reviewed-by: Allan Sandfeld Jensen <allan.jensen@qt.io>
(cherry picked from commit 6b1a1b7af3)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
(cherry picked from commit e85ada3122)
This commit is contained in:
Tor Arne Vestbø 2025-08-19 00:59:34 +02:00 committed by Qt Cherry-pick Bot
parent 2490e9ce19
commit 3beff27402
1 changed files with 1 additions and 1 deletions

View File

@ -6164,7 +6164,7 @@ static constexpr QPixelFormat pixelformats[] = {
/*FIFTH*/ 0,
/*ALPHA*/ 4,
/*ALPHA USAGE*/ QPixelFormat::UsesAlpha,
/*ALPHA POSITION*/ QPixelFormat::AtEnd,
/*ALPHA POSITION*/ QPixelFormat::AtBeginning,
/*PREMULTIPLIED*/ QPixelFormat::Premultiplied,
/*INTERPRETATION*/ QPixelFormat::UnsignedShort,
/*BYTE ORDER*/ QPixelFormat::CurrentSystemEndian),