Re: Image Scaling

"Sebastian Geerken" <[email protected]>
Newsgroups gmane.comp.web.dillo.devel
Message-ID <[email protected]>
[...]
> > > Nice! BTW, I have this page bookmarked for quite some time:
> > > http://www.4p8.com/eric.brasseur/gamma.html
> > > I don't know whether this makes a difference in real life, but the
> > > examples are interesting.
> > 
> > Interesting!
> > 
> > I didn't read the whole article, but it made me wonder what effect a
> > gamma correction has on image scaling. See the test page
> > <http://www.4p8.com/eric.brasseur/gamma_dalai_lama.html> with:
> > 
> > 1. dillo 3.0.3,
> > 2. current version from the hg repository, and
> > 3. latter with the attached patch applied.
> > 
> > The patch uses floating point arithmetics; perhaps there is a faster
> > algorithm based on integer arithmetics.
> 
> I don't know, but we could cache the values as in attached patch.

Yes, I also thought about this, and probably the fastest way is to
calculate all values once, at the beginning, and later only access the
array.

I've been working on the other side: from what I've understood, image
data is in most cases already gamma-corrected. I'd like to extend
ImgBuf by the gamma value, and the different parsers (GIF, JPEG, PNG)
should extract the factor from the image.

So far, I'm working on JPEG, and came upon the field "output_gamma" in
"struct jpeg_decompress_struct". Unfortunately, this value seems
always 1. Can someone give me a hint?

Sebastian
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.