diff tools/gfxconv.c @ 1291:2c4acbc3e7bf

More work on libgfx etc.
author Matti Hamalainen <ccr@tnsp.org>
date Fri, 18 Aug 2017 18:56:09 +0300
parents e7dc9bb9777e
children 1dce9e5f4a2f
line wrap: on
line diff
--- a/tools/gfxconv.c	Fri Aug 18 17:47:30 2017 +0300
+++ b/tools/gfxconv.c	Fri Aug 18 18:56:09 2017 +0300
@@ -146,7 +146,7 @@
     .scaleY = 1,
     .nplanes = 4,
     .bpp = 8,
-    .interleave = FALSE,
+    .planar = FALSE,
     .paletted = FALSE,
     .format = 0,
 };
@@ -168,9 +168,9 @@
     {  9, 'S', "scale",         "Scale output image by <n> or <x>:<y> integer factor(s). "
                                 "-S <n> scales both height and width by <n>.", OPT_ARGREQ },
     { 12, 'P', "paletted",      "Use indexed/paletted output IF possible.", OPT_NONE },
-    { 13, 'N', "nplanes",       "# of bitplanes (certain output formats)", OPT_ARGREQ },
-    { 18, 'B', "bpp",           "Bits per pixel (certain output formats)", OPT_ARGREQ },
-    { 14, 'I', "interleave",    "Interleave output image scanlines (default: output whole planes)", OPT_NONE },
+    { 13, 'N', "nplanes",       "# of bitplanes (some output formats)", OPT_ARGREQ },
+    { 18, 'B', "bpp",           "Bits per pixel (some output formats)", OPT_ARGREQ },
+    { 14, 'P', "planar",        "Interleaved/planar output (some output formats)", OPT_NONE },
     { 16, 'R', "remap",         "Remap output image colors (-R <(#RRGGBB|index):index>[,<..>][+remove] | -R @map.txt[+remove])", OPT_ARGREQ },
 };
 
@@ -688,7 +688,7 @@
             break;
 
         case 14:
-            optSpec.interleave = TRUE;
+            optSpec.planar = TRUE;
             break;
 
         case 16:
@@ -1179,7 +1179,12 @@
                     dmFree(palID);
                 }
 
-                if (info) dmMsg(2, "%d bitplanes, %s interleave.\n", spec->nplanes, spec->interleave ? "with" : "without");
+                if (info)
+                {
+                    dmMsg(2, "%d bitplanes, %s planes.\n",
+                        spec->nplanes,
+                        spec->planar ? "planar/interleaved" : "non-interleaved");
+                }
                 return dmWriteRAWImage(filename, image, spec);
             }
             break;