Mailing Lists: Apple Mailing Lists

Image of Mac OS face in stamp
 
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Color reduction



On Fri, 11 Jan 2008, Scott Ribe wrote:

Any pointers to algorithms for reducing RGB888 images to 8-bit + clut?

The generic terms to google for are "color quantization" and "error diffusion dithering". The first is the problem of finding a (small) colour palette that covers the color gamut of some given image(s). The latter is about using pixels of the limited palette to represent the original true colour image as good as possible.

Depending on how much time you have at your hands, and depending on how much cycles you can spend, there are several algorithms to choose from. In particular, there are other colour dithering algorithms than error diffusion, such as halftoning or other ordered dithers or even sophisticated iterative solutions based on energy minimization.

Quantization is also a wider field, colour quantization is a special case of "vector quantization". On the other hand, human perception of colours plays a role here. So if you want to go for the best possible color reduced images, you might want to do all computation in a colour space that models perceived contrast of colours.

Or, if that is an option, be inspired by open source programs like ppmquant (of the netpbm package).

And as Ian said, don't do colour reduction when you really want to compress images. Compression algorithms can make much smarter choices about which redundancy to get rid of.

  Holger
_______________________________________________
Do not post admin requests to the list. They will be ignored.
PerfOptimization-dev mailing list      (email@hidden)
Help/Unsubscribe/Update your Subscription:
http://lists.apple.com/mailman/options/perfoptimization-dev/email@hidden

This email sent to email@hidden
References: 
 >Color reduction (From: Scott Ribe <email@hidden>)



Visit the Apple Store online or at retail locations.
1-800-MY-APPLE

Contact Apple | Terms of Use | Privacy Policy

Copyright © 2007 Apple Inc. All rights reserved.