I'm trying to use IM in my 'modern day Amiga workflow'. I'll usually be starting from a high resolution 8bit/channel image that has, say, been rendered in Blender. I'll need to convert this image to a low resolution paletted/color-indexed version of it. I'll probably be able to handle the resolution change, but let's focus on color reduction ('palettization') for now.
The (original) Amiga uses color-indexed images with a maximum of 32 colors. Of course, it handles any number of colors that is a power of 2, so 2 (b/w), 4, 8, 16 or 32. The bit depth per channel is 4, so a color is represented by 3 'nibbles', eg $000 represents black, $888 grey and $fff white. There's a total of 16³ = 4096 colors to choose from.
Eg, I'm doing a lot of these:
Code: Select all
convert IN.jpg -colors 16 -depth 4 OUT.png
1) If I look at the properties of the result (magick identify -verbose OUT.png), it will usually have the expected number of colors (eg, 16), but it tends to have 1 more color (so 17 in total) in the 'Colormap entries', usually white. Is this intended? Can it be avoided? Because I'll obviously also need easy access to (read: I'd like to copy & paste) the generated palette.
2) Can I specify the colors in the resulting palette myself? As I said, the conversion usually looks good and everything, but it would definitely be handy if I could specify some (or all) of the colors myself. Is this possible at all?
TIA for any thoughts/tips on this!