From b22ff3cea82f953f1a40195b81b10aede77b3be4 Mon Sep 17 00:00:00 2001 From: Hrnchamd Date: Tue, 23 Feb 2016 22:19:01 +0000 Subject: [PATCH] Fix uncompressed DDS header pitch The pitch value is supposed to be in bytes, not bits. --- coders/dds.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/coders/dds.c b/coders/dds.c index 07e60d31c..a966151db 100644 --- a/coders/dds.c +++ b/coders/dds.c @@ -2731,9 +2731,9 @@ static void WriteDDSInfo(Image *image, const size_t pixelFormat, { // Uncompressed DDS requires byte pitch of first image if (image->alpha_trait != UndefinedPixelTrait) - (void) WriteBlobLSBLong(image,(unsigned int) (image->columns * 32)); + (void) WriteBlobLSBLong(image,(unsigned int) (image->columns * 4)); else - (void) WriteBlobLSBLong(image,(unsigned int) (image->columns * 24)); + (void) WriteBlobLSBLong(image,(unsigned int) (image->columns * 3)); } (void) WriteBlobLSBLong(image,0x00); -- 2.40.0