I have tried this for a test, but it gives an error message. Am I doing something wrong?
convert logo: -resize 50% -colorspace gray -transparent white logo2gt.png
identify -verbose logo2gt.png
Format: PNG (Portable Network Graphics)
Class: PseudoClass
Geometry: 320x240+0+0
Resolution: 72x72
Print size: 4.44444x3.33333
Units: Undefined
Type: GrayscaleMatte
Base type: GrayscaleMatte
Endianess: Undefined
Colorspace: RGB
Depth: 8-bit
Channel depth:
gray: 8-bit
alpha: 1-bit
convert logo2gt.png -define png:color-type=6 logo2gt_t6.png
convert: Cannot write image with defined PNG:bit-depth or PNG:color-type. `logo2gt_t6.png' @ png.c/PNGErrorHandler/1455.
see
http://www.imagemagick.org/Usage/formats/#png_write where it says to use 6 for RGB Matte
Even this may not work correctly?
convert logo: -resize 50% -colorspace gray -depth 8 logo2g.png
convert logo2gt.png -define png:color-type=2 logo2g_t2.png
identify logo2g_t2.png
Format: PNG (Portable Network Graphics)
Class: DirectClass
Geometry: 320x240+0+0
Resolution: 72x72
Print size: 4.44444x3.33333
Units: Undefined
Type: Grayscale
Base type: Grayscale
Endianess: Undefined
Colorspace: RGB
Depth: 8-bit
Channel depth:
gray: 8-bit
Shouldn't the type be truecolor and not grayscale?
But the class has been changed to Truecolor!
I am not sure what to expect?