Time to be with your loved ones

Time to be with loved ones

by sat

submit your photo

Hall of Fame
View past winners from this year

Please participate in Meta
and help us grow.

Take the 2-minute tour ×
Photography Stack Exchange is a question and answer site for professional, enthusiast and amateur photographers. It's 100% free, no registration required.

That is kind of a "please proof-read an articles conclusion"-question. Some time ago I found this page: Gamma error in picture scaling.

I grasp the point, that the luminosity-curve is not linear and that some (most) software does assume a linear scale and thus resizes badly.

But as I do not have so much experience in the field of image-manipulation / gamma / etc (just starting with the fine points of post-processing), let me ask you: is this guy right about this error during resizing? Is his method to determine erroneous software correct?

share|improve this question
The link is to a highly technical article that is less about photography than about algorithms used in photo manipulation software. I'd say this was off-topic. –  Nick Miners Jan 28 '11 at 12:57
Might be. But resizing is part of my picture-processing. I often batch-resize pictures before giving them out and wonder if this gamma-error a negative impact on them I did not really notice until now. (edit: I even resize for first evaluation, as my screen is only 1920x1080 and I like to evaluate full-picture instead of 100% zoom. So first sorting of pictures itself is impacted.) If the author is right, I'd better have a look into finding alternative SW. –  Leonidas Jan 28 '11 at 13:21
This article is awesome! –  ysap Jan 28 '11 at 20:13
Still look in the matter by the way. Up to now did not find real-life differences, but it takes time. –  Leonidas Feb 11 '11 at 13:36
add comment

1 Answer

up vote 3 down vote accepted

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.

share|improve this answer
Interesting option to find a SW that scales (interpolates) the non-corrected RAW (more/again) to the sizes I use and applies the gamma later. –  Leonidas Jan 28 '11 at 14:51
@Leonidas - it looks like in the article you provided there is a list (albeit an old one) of "correct" software: 4p8.com/eric.brasseur/gamma.html?#solutions –  ysap Jan 28 '11 at 19:11
Yes, there is. Today I already used the first, pamscale readily available with Linux/cygwin. I overlooked that RawTherapee is part of the list - that might implement the solution you suggest. But: question remains if there really is this problem on doing rescale on JPG. I do not have photos like his example from the bugs eyes readily available to test the idea. –  Leonidas Jan 28 '11 at 20:26
@Leonidas - I guess you can download the sample images from the article and use it in whatever processor you use to test for correctness. Also note that the solution I suggested is one possible approach, and is relevant only when you have a RAW processor (LightRoom is in the list, so maybe it is an OK software?). What the writer seems to do (I did not read the whole of it yet) is first do the inverse gamma transform (effectively returning to the linear RAW space), interpolate and last gamma transform again. –  ysap Jan 28 '11 at 20:50
What do you mean "if he is right"? Mathematically? Sure he is! About the setup? Well, this is up to you to check. –  ysap Jan 28 '11 at 21:14
show 1 more comment

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.