Thanks. That helps for grayscale. But then under what conditions or circumstances does that -define work? Can you explain a bit further and give an example.
Also it does not work for bilevel.
Code: Select all
convert rose: -threshold 0 -depth 8 -type truecolor rose_tmp.png
Image: rose_tmp.png
Format: PNG (Portable Network Graphics)
Mime type: image/png
Class: PseudoClass
Geometry: 70x46+0+0
Units: Undefined
Type: Grayscale
Base type: Grayscale
Endianess: Undefined
Colorspace: Gray
Depth: 8/1-bit
I think IM should allow -type (or some other mechanism) to override the base type internally determined by IM, so that palette, grayscale or bilevel could always be saved as truecolor, if desired by the user. Basically it lets any restricted type be saved or up-typed to a more flexible type.
Don't all image types support an (s)RGB type (except for GIF and PGM for example, the latter of which could be up-typed to PNM or PAM). But I suspect most users would be happy with JPG, PNG, and TIFF (and perhaps PSD).
Other opinions or comments are welcome.