Re: Linear Colorspace
Sam Wilson <[email protected]>
| Newsgroups | gmane.comp.video.graphicsmagick.help |
|---|---|
| Message-ID | <[email protected]> |
On 02/12/15 17:24, Bob Friesenhahn wrote > Use: > > ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ > > image.gamma(0.454545); // 1/2.2 > [ do something ] > image.gamma(2.2); > > ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Good enough for me for now. On a technical level, isn't this an approximation since sRGB doesn't have a constant gamma? > The above should accomplish what the article recommends. Keep in mind > that whenever you apply a gamma correction change, the image is > subject to quantization error (new value is subject to the number of > discrete levels available). The quantization error will be reduced by > using a Q:16 build. Right. I selected a quantum of 16 when I built the library for just this reason. > There are factors other than gamma to consider such as the colorspace > used. This is a reason why there is a note in the documentation for > -colors which says: > > "Empirical evidence suggests that distances in color spaces such as > YUV or YIQ correspond to perceptual color differences more closely > than do distances in RGB space. These color spaces may give better > results when color reducing an image." > > The same issues apply to resize and any other operations which blend > pixels. Are you suggesting that resizing in YUV or YIQ would yield better (or at least) the same results? Thanks again, Sam ------------------------------------------------------------------------------ Go from Idea to Many App Stores Faster with Intel(R) XDK Give your users amazing mobile app experiences with Intel(R) XDK. Use one codebase in this all-in-one HTML5 development environment. Design, debug & build mobile apps & 2D/3D high-impact games for multiple OSs. http://pubads.g.doubleclick.net/gampad/clk?id=254741911&iu=/4140