[Qt-interest] Scaling bug in most software
Dan Mills
dmills at exponent.myzen.co.uk
Wed Feb 24 21:46:19 CET 2010
On Wed, 2010-02-24 at 21:07 +0100, Werner Van Belle wrote:
> Could somebody explain me _what_ the problem actually is ? I mean: how
> can a scaling function affect the gamma correction (that should be
> performed later anyway) ?
Basically, most image files are sRGB (which implies a non linear curve,
gamma about 2.2).
Sum two pixels from such a file (without converting to a linear
quantisation first) and you get the wrong answer.
The problem is that 8 bit sRGB (with a gamma of ~2.2), converts to a
linear mapping needing better then 16 bits to avoid loss of precision,
and that really hurts as if you use fixed point int then your memory
usage has gone up 4 times (And the cache has not grown any bigger!).
In practise summing sRGB is close enough for most applications,
certainly compared to the performance hit, and when it does matter,
there are ways to deal with it.
This is pretty much a storm in a teacup, folks that understand
colorimetry can deal with it trivially (Convert image to gamma 1.0 at
sufficient word length, do what needs to be done, then apply output
gamma and dither to output wordlength), most other people will never
notice (And yes, you can deal with it correctly in photoshop).
Regards, Dan.
More information about the Qt-interest-old
mailing list