From a427dcdf4dd2ffa342d6ab915adc5cfc571ff5e7 Mon Sep 17 00:00:00 2001 From: Jacob Boerema Date: Tue, 7 Jan 2025 13:58:00 -0500 Subject: [PATCH] plug-ins, dds: incorrect flags when exporting to l8 and l8a8 formats. When exporting a dds with types l8 or l8a8 we were also setting the green and blue masks to 0xff instead of using 0 (since these channels are not used for these formats). See issue #12660 Set these channel masks to 0 to be more conforming to dds standards and update our plug-in revision. --- plug-ins/file-dds/dds.h | 2 +- plug-ins/file-dds/ddswrite.c | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/plug-ins/file-dds/dds.h b/plug-ins/file-dds/dds.h index 1e539837f8..5ee09dc718 100644 --- a/plug-ins/file-dds/dds.h +++ b/plug-ins/file-dds/dds.h @@ -24,7 +24,7 @@ #define DDS_PLUGIN_VERSION_MAJOR 3 #define DDS_PLUGIN_VERSION_MINOR 9 -#define DDS_PLUGIN_VERSION_REVISION 92 +#define DDS_PLUGIN_VERSION_REVISION 93 #define DDS_PLUGIN_VERSION \ ((guint) (DDS_PLUGIN_VERSION_MAJOR << 16) | \ diff --git a/plug-ins/file-dds/ddswrite.c b/plug-ins/file-dds/ddswrite.c index 06f761ab0d..3fc845d64a 100644 --- a/plug-ins/file-dds/ddswrite.c +++ b/plug-ins/file-dds/ddswrite.c @@ -107,8 +107,8 @@ static struct { DDS_FORMAT_RGB10A2, DXGI_FORMAT_R10G10B10A2_UNORM, 4, TRUE, 0x000003ff, 0x000ffc00, 0x3ff00000, 0xc0000000}, { DDS_FORMAT_R3G3B2, DXGI_FORMAT_UNKNOWN, 1, FALSE, 0x000000e0, 0x0000001c, 0x00000003, 0x00000000}, { DDS_FORMAT_A8, DXGI_FORMAT_A8_UNORM, 1, FALSE, 0x00000000, 0x00000000, 0x00000000, 0x000000ff}, - { DDS_FORMAT_L8, DXGI_FORMAT_R8_UNORM, 1, FALSE, 0x000000ff, 0x000000ff, 0x000000ff, 0x00000000}, - { DDS_FORMAT_L8A8, DXGI_FORMAT_UNKNOWN, 2, TRUE, 0x000000ff, 0x000000ff, 0x000000ff, 0x0000ff00}, + { DDS_FORMAT_L8, DXGI_FORMAT_R8_UNORM, 1, FALSE, 0x000000ff, 0x00000000, 0x00000000, 0x00000000}, + { DDS_FORMAT_L8A8, DXGI_FORMAT_UNKNOWN, 2, TRUE, 0x000000ff, 0x00000000, 0x00000000, 0x0000ff00}, { DDS_FORMAT_AEXP, DXGI_FORMAT_B8G8R8A8_UNORM, 4, TRUE, 0x00ff0000, 0x0000ff00, 0x000000ff, 0xff000000}, { DDS_FORMAT_YCOCG, DXGI_FORMAT_B8G8R8A8_UNORM, 4, TRUE, 0x00ff0000, 0x0000ff00, 0x000000ff, 0xff000000} };