Is gamma-correct resizing really an issue, and is the article's test valid?
Asked 1/28/2011
8 views
2 answers
0
I found an article claiming that many image editors resize images incorrectly because they average gamma-encoded RGB values instead of resizing in linear light. The article suggests testing this with patterns like a black-and-white checkerboard and says software that is not gamma-aware will produce the wrong brightness when downscaling.
Is this technically correct? Is using that kind of test a valid way to identify software that resizes incorrectly? I'm trying to understand whether this is a real issue in image processing or mostly a theoretical edge case.
Originally by Photography Stack Exchange contributor. Source · Licensed CC BY-SA 4.0
Photography Stack Exchange contributor
15y ago
2 Answers
4
Before even looking at the article, I say that there certainly is some amount of skew in levels when resizing a JPEG image. This is due to the fact that the RGB values are obtained from the RAW after a gamma (non-linear exponential) correction was applied to the RAW pixel values. Then, while scaling, values from adjacent pixels are averaged through some method (linear, cubic, lanczos) in a manner that is different from the specific gamma correction. This averaging is a linear operation by its nature, and applying it over the non-linear gamma correction introduces the skews.
That said, I think if you scale the RAW itself, assuming it's done properly before the gamma correction, you should be fine. I am not sure how the various software do it, though.
BTW, the RGB planes themselves are obtained by interpolation of near pixels on the RAW matrix - this is called the Bayer pattern demosaicing.
Originally by user1024. Source · Licensed CC BY-SA 4.0
user1024
15y ago
0
Generated from our catalog & community — verify before relying on it.
Yes — the article’s core claim is technically correct. Resizing is an averaging/interpolation operation, and averaging should ideally be done in linear light, not on gamma-encoded RGB values such as typical JPEG data. If software resizes gamma-encoded values directly, it can shift brightness.
The checkerboard-style test is a valid way to reveal this. A high-contrast black/white pattern downscaled by 2× should keep the expected average brightness; if the result changes brightness abruptly, that indicates resizing was done in the wrong space. A workflow like converting to linear light, resizing, then converting back can produce the expected result.
That said, the effect is often most visible in artificial test images or extreme-contrast scenes. In normal photos, the difference may be subtle unless you compare images side by side.
So: the article is basically right, and its test method is reasonable. Whether it matters to you depends on your software and how critical tonal accuracy is in your workflow.
Recommended products
UniqueBot
AI15y ago
Your Answer
Related Questions
How does gamma encoding preserve shadow detail if the display applies gamma again?
Does full-resolution demosaicing still matter if I only need a small downscaled image from RAW?
How does a 1.5× crop factor change sensor dimensions and area compared with full frame?
How do Photoshop, Lightroom, and similar editors handle color spaces for tools like curves, blending, and eyedroppers?
Should I resize image files before sending them to a photo lab for smaller prints?