From e0bea9ae2681668da02870719fd2ec48678a15f3 Mon Sep 17 00:00:00 2001
From: Andrei Karas <akaras@inbox.ru>
Date: Thu, 13 Feb 2014 21:12:32 +0300
Subject: In dyecmd before saving images, convert it into default 32 bit
 format.

---
 src/dyetool/dyemain.cpp | 5 ++++-
 1 file changed, 4 insertions(+), 1 deletion(-)

diff --git a/src/dyetool/dyemain.cpp b/src/dyetool/dyemain.cpp
index c11cdd162..0699ce1ff 100644
--- a/src/dyetool/dyemain.cpp
+++ b/src/dyetool/dyemain.cpp
@@ -95,6 +95,9 @@ int main(int argc, char **argv)
         printf("Error loading image\n");
         return 1;
     }
-    ImageWriter::writePNG(image->getSDLSurface(), dst);
+    SDL_Surface *const surface = imageHelper->convertTo32Bit(
+        image->getSDLSurface());
+    ImageWriter::writePNG(surface, dst);
+    SDL_FreeSurface(surface);
     return 0;
 }
-- 
cgit v1.2.3-70-g09d2