LWN.net Logo

Image scaling problem

Image scaling problem

Posted Mar 5, 2010 2:02 UTC (Fri) by rgmoore (subscriber, #75)
In reply to: Image scaling problem by spitzak
Parent article: SCALE 8x: Color management for everyone

If as the original poster said, everybody could assume the image is sRGB, then the scaling algorithim could be designed to correctly scale sRGB. This is much easier than something that can scale "anything".
A) I'm not sure that it would be any easier to do everything on the raw sRGB data. It's not just image scaling but all aspects of image processing that are easier to do on linear data. It's likely to be easier to write one algorithm to convert sRGB to linear and one to convert it back than to include an implicit implicit conversion in every image processing algorithm. And if you care about correctness- which you obviously do if you're bothering to worry about the gamma applied data- it's going to be much easier to prove that you're doing everything correctly by working on explicitly gamma corrected data than to count on having the correction in every routine.

B) The "everything is sRGB" assumption is untrue. Real world programs have to deal with all kinds of color spaces. Once you have to deal with more than two color spaces (sRGB and linear), the need for real color management will be much more obvious.


(Log in to post comments)

Copyright © 2013, Eklektix, Inc.
Comments and public postings are copyrighted by their creators.
Linux is a registered trademark of Linus Torvalds