Image Editing Software – How It Changes Image Contrast

image manipulation

How does Photoshop or other image editing software change an images contrast? What does contrast mean when we process an image pixel by pixel? Or what does image contrast mean at all?

Here I created a very basic image to understand image contrast. This is a 10×10 pixels image that gets a 100% non-legacy contrast adjustment in Photoshop. The only change I saw was in gray colors that were lighter after applying the contrast.

Before and after contrast:

The images before and after contrasts are similar, except for the gray color which is slightly lighter

Best Answer

Actually, there are two very different algorithms in Adobe Photoshop CS3 or later.

The old one just shifts linearly the color of a pixel. The second one works proportionally. If your intent is to understand, in general, how contrast is applied, use the legacy contrast only. Here's an image showing a difference:

The new contrast shows no difference. The legacy contrast is very different from the original image.

When using legacy contrast, you see that it's much more intuitive from developers point of view. It actually lightens the dark pixels, and darkens the light ones when reducing the contrast. When increasing the contrast, you will see the same happening with gray color (turning lighter, then white at 100%), while blank and white staying the same.

From the point of view of photographers, on the other hand, this doesn't make any sense. As you can see below, when applied to real images, the new contrast algorithm has much better visual results than the old one:

enter image description here

enter image description here

See also:

Related Topic