Using the Color Content Image Enhancement Filter

The Pixtools Color Content filter is perhaps one of the least understood image enhancement filters.  Quite simple, the Color Content filter detects the amount of "color" on an image.  So why would one want to know the color content?  Here are a couple of reasons:

 

1.  If the image has a color content, then save the image in color (this preserves the color of course).

2.  If the image has no color content, then save the image in binary (binary images are significantly smaller than color images).

 

The sample attached to this document detects the color content of an image, and saves the image to either gray-scale or binary based on the color content.  One advantage to saving to binary is that bar-codes are detected easier on binary images, as the contrast between black and white is very apparent.  Also the sample allows the changing of the DPI of an image, as the DPI of an image also affects the image size.

 

So if your end goal is to produce the most appropriate image type (either gray-scale or binary), and then reduce the size of the image for transmission purposes, the color content filter can help you make these types of programmatic decisions.