From f88cf324a0bef2db4419c867ab97cb0741d366d1 Mon Sep 17 00:00:00 2001 From: Allan Sandfeld Jensen Date: Mon, 16 Mar 2015 12:52:23 +0100 Subject: Correct mask of A2B10G10R10 Green mask is missing an F. Change-Id: I7387ef01ee414abc1a48efec71d71f46922c1bed Reviewed-by: Oswald Buddenhagen Reviewed-by: Frederik Gladhorn --- src/plugins/imageformats/dds/qddshandler.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/plugins/imageformats/dds/qddshandler.cpp') diff --git a/src/plugins/imageformats/dds/qddshandler.cpp b/src/plugins/imageformats/dds/qddshandler.cpp index 26aa160..2fb6162 100644 --- a/src/plugins/imageformats/dds/qddshandler.cpp +++ b/src/plugins/imageformats/dds/qddshandler.cpp @@ -101,7 +101,7 @@ struct FormatInfo static const FormatInfo formatInfos[] = { { FormatA8R8G8B8, DDSPixelFormat::FlagRGBA, 32, 0x00ff0000, 0x0000ff00, 0x000000ff, 0xff000000 }, { FormatX8R8G8B8, DDSPixelFormat::FlagRGB, 32, 0x00ff0000, 0x0000ff00, 0x000000ff, 0x00000000 }, - { FormatA2B10G10R10, DDSPixelFormat::FlagRGBA, 32, 0x000003ff, 0x0000fc00, 0x3ff00000, 0xc0000000 }, + { FormatA2B10G10R10, DDSPixelFormat::FlagRGBA, 32, 0x000003ff, 0x000ffc00, 0x3ff00000, 0xc0000000 }, { FormatA8B8G8R8, DDSPixelFormat::FlagRGBA, 32, 0x000000ff, 0x0000ff00, 0x00ff0000, 0xff000000 }, { FormatX8B8G8R8, DDSPixelFormat::FlagRGB, 32, 0x000000ff, 0x0000ff00, 0x00ff0000, 0x00000000 }, { FormatG16R16, DDSPixelFormat::FlagRGBA, 32, 0x0000ffff, 0xffff0000, 0x00000000, 0x00000000 }, -- cgit v1.2.3 From 98f83553e9fe2aa5fc54b32513af6ba3aa60a07b Mon Sep 17 00:00:00 2001 From: Maks Naumov Date: Sat, 20 Sep 2014 17:23:37 +0300 Subject: DDS: fix image format check Replace duplicated bBitMask check by the intended gBitMask check. Change-Id: I6d1780a4112e88484de661f07a15f2121602b86c Reviewed-by: Oswald Buddenhagen Reviewed-by: Allan Sandfeld Jensen --- src/plugins/imageformats/dds/qddshandler.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/plugins/imageformats/dds/qddshandler.cpp') diff --git a/src/plugins/imageformats/dds/qddshandler.cpp b/src/plugins/imageformats/dds/qddshandler.cpp index 2fb6162..6ec2804 100644 --- a/src/plugins/imageformats/dds/qddshandler.cpp +++ b/src/plugins/imageformats/dds/qddshandler.cpp @@ -323,7 +323,7 @@ static Format getFormat(const DDSHeader &dds) if ((format.flags & info.flags) == info.flags && format.rgbBitCount == info.bitCount && format.rBitMask == info.rBitMask && - format.bBitMask == info.bBitMask && + format.gBitMask == info.gBitMask && format.bBitMask == info.bBitMask && format.aBitMask == info.aBitMask) { return info.format; -- cgit v1.2.3