]> granicus.if.org Git - imagemagick/commitdiff
Added option to the dds encoder to make it possible to only write the raw pixels.
authorDirk Lemstra <dirk@lemstra.org>
Sun, 20 Jan 2019 14:31:52 +0000 (15:31 +0100)
committerDirk Lemstra <dirk@lemstra.org>
Sun, 20 Jan 2019 14:31:52 +0000 (15:31 +0100)
coders/dds.c

index 77b3efb9caaa97db93f73620f11f2118fe8bdbcc..fd506b2edf04280eec54c55f70159aa45983fd2b 100644 (file)
@@ -2868,7 +2868,11 @@ static MagickBooleanType WriteDDSImage(const ImageInfo *image_info,
         }
     }
 
-  WriteDDSInfo(image,pixelFormat,compression,mipmaps);
+  option=GetImageOption(image_info,"dds:raw");
+  if (IsStringTrue(option) == MagickFalse)
+    WriteDDSInfo(image,pixelFormat,compression,mipmaps);
+  else
+    mipmaps=0;
 
   WriteImageData(image,pixelFormat,compression,clusterFit,weightByAlpha,
     exception);