Re: Linear Colorspace

[email protected]
Newsgroups gmane.comp.video.graphicsmagick.help
Message-ID <[email protected]>
----- Sam Wilson <[email protected]> wrote:
> 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?

Yes.  It's a pretty good approximation except in the deep shadows.

> > 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?

It's possible.  They might make a mess of the Dalai image, though, which
is designed to tell whether gamma was used.  I might do some experimenting
and report back, but not today.

Glenn

------------------------------------------------------------------------------
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
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.