Page 1 of 1

8bit per channel to 6bpc (RGB)

Posted: 2012-05-29T12:14:31-07:00
by Scorp1us
I need to convert some images to 6bpc, which is to say that I want to zero the last 2 bits of each each RGB channel for preview on a reduced color display.

How can I do this with imagemagick?

Many thanks!

Re: 8bit per channel to 6bpc (RGB)

Posted: 2012-05-30T00:51:06-07:00
by anthony
Level white to a value of 2^6-1 then +level back again. That should do the job.

convert image.png -level 0,63 +level 0,63 result.png

See 'Quantum Rounding' which is typically something to avoid, but in your case you want to do.
http://www.imagemagick.org/Usage/basics ... um_effects