]> mj.ucw.cz Git - libucw.git/blobdiff - images/image-tool.c
support for transparent GIFs, finally
[libucw.git] / images / image-tool.c
index 6b9062c1eaadd14aa9b311d232635ab363dd7e0a..b52d59fda6cb4809887c2a237a39b5ffec56ca64 100644 (file)
@@ -46,7 +46,7 @@ static struct option longopts[] =
   { "fit-to-box",      0, 0, 'b' },
   { "colorspace",      0, 0, 'c' },
   { "jpeg-quality",    0, 0, 'Q' },
-  { "background",      0, 0, 'g'  },
+  { "background",      0, 0, 'g' },
   { NULL,              0, 0, 0 }
 };
                                                          
@@ -153,6 +153,12 @@ main(int argc, char **argv)
       printf("Dimensions:  %dx%d\n", io.cols, io.rows);
       printf("Colorspace:  %s\n", (io.flags & IMAGE_IO_HAS_PALETTE) ? (byte *)"Palette" : image_channels_format_to_name(io.flags & IMAGE_CHANNELS_FORMAT));
       printf("NumColors:   %d\n", io.number_of_colors);
+      if (io.background_color.color_space)
+        {
+         byte rgb[3];
+         color_put_rgb(rgb, &io.background_color);
+          printf("Background:  %02x%02x%02x\n", rgb[0], rgb[1], rgb[2]);
+       }
     }
   else
     {