From 989b9da3007ff06c79ab7ee553acfce9177df5b6 Mon Sep 17 00:00:00 2001 From: Allan Sandfeld Jensen Date: Wed, 7 Jun 2017 17:28:25 +0200 Subject: Fix BMP ImageFormat for semi-transparent files Reads the v4 and v5 info-header together with the rest of the info- headers, and use that to report the correct image format before decoding. Change-Id: I69e2bcc54367b7f14820815ae2ae1fa2d8d5dc8c Reviewed-by: Eirik Aavitsland --- src/gui/image/qbmphandler_p.h | 15 +++++++++++++++ 1 file changed, 15 insertions(+) (limited to 'src/gui/image/qbmphandler_p.h') diff --git a/src/gui/image/qbmphandler_p.h b/src/gui/image/qbmphandler_p.h index 3e1fc3d511..56b39dd0f0 100644 --- a/src/gui/image/qbmphandler_p.h +++ b/src/gui/image/qbmphandler_p.h @@ -78,6 +78,21 @@ struct BMP_INFOHDR { // BMP information header qint32 biYPelsPerMeter; // vertical resolution qint32 biClrUsed; // number of colors used qint32 biClrImportant; // number of important colors + // V4: + quint32 biRedMask; + quint32 biGreenMask; + quint32 biBlueMask; + quint32 biAlphaMask; + qint32 biCSType; + qint32 biEndpoints[9]; + qint32 biGammaRed; + qint32 biGammaGreen; + qint32 biGammaBlue; + // V5: + qint32 biIntent; + qint32 biProfileData; + qint32 biProfileSize; + qint32 biReserved; }; // BMP-Handler, which is also able to read and write the DIB -- cgit v1.2.3