Converting the color depth of image to 8 bit from 32 bit

Questions and postings pertaining to the usage of ImageMagick regardless of the interface. This includes the command-line utilities, as well as the C and C++ APIs. Usage questions are like "How do I use ImageMagick to create drop shadows?".
Post Reply
User avatar
magick
Site Admin
Posts: 11064
Joined: 2003-05-31T11:32:55-07:00

Post by magick »

To create 8 bit PNG images, use the PNG8 format:
  • convert input.png png8:output.png
User avatar
magick
Site Admin
Posts: 11064
Joined: 2003-05-31T11:32:55-07:00

Post by magick »

RGB images are generally 24 bits, 8 bits for each channel. If an alpha channel is included, the RGBA image is 32 bit. A 16-bit per channel image can be reduced to 8 with the -depth 8 option. To get a 8-bit image you need a single channel which requires the image is colormapped or grayscale. To get a colormapped image, use PNG8 as we suggested. For grayscale, use -type scale. If you use PNG8 and the Properties panel still says 32, the Properties panel is wrong and mostly has a bug.
Post Reply