The premise is that I'm trying to batch resize a bunch of 32bit png-s with transparency. The 3rd party tool that I'm using to load the result images complains for some of them that it doesn't support non-8-bit Greyscale.
Quite clearly, neither the original, nor the resulting images are greyscale. The command I'm using is:
Code: Select all
mogrify -resize 50x50% -depth 8 *.png
Now, the problem is that out of these five images the first four load fine, and it is the last one that fails (the originals all load fine). "calendar_day_present.png" is actually a solid white rectangle. (Windows 7 Explorer's Bit Depth column reports a bit depth of 1 on all of these files; the originals had 32 - I'm not sure how accurate this feature is, but most of my 24/32 bit originals went to 1/4/8 bits according to it.)calendar_day_future_dark.png PNG 119x107 119x107+0+0 8-bit DirectClass 352B 0.000u 0:00.000 (sRGB / PaletteAlpha / 8-bit)
calendar_day_future_light.png[1] PNG 119x107 119x107+0+0 8-bit DirectClass 352B 0.000u 0:00.000 (sRGB / PaletteAlpha / 8-bit)
calendar_day_past_dark.png[2] PNG 119x107 119x107+0+0 8-bit PseudoClass 2c 339B 0.000u 0:00.000 (sRGB / Palette / 8-bit)
calendar_day_past_light.png[3] PNG 119x107 119x107+0+0 8-bit PseudoClass 2c 339B 0.000u 0:00.000 (sRGB / Palette / 8/4-bit)
calendar_day_present.png[4] PNG 119x107 119x107+0+0 8-bit PseudoClass 2c 327B 0.000u 0:00.000 (Gray / Bilevel / 8/1-bit)
How can I make sure that each image has the same Colourspace as its original when using mogrify, i.e. they're not converted into greyscale / palettised images and the alpha channel isn't lost?
Thank you for your help in advance.