emacs-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: PNG pictures have gamma correction twice applied


From: David Kastrup
Subject: Re: PNG pictures have gamma correction twice applied
Date: Sat, 30 Nov 2002 14:36:14 +0100

Richard Stallman <address@hidden> writes:

> Would you like to rewrite the png code thoroughly?

Unfortunately, it is not just the PNG code, it is the entire
color/image management that is involved here.

> If only the png library does its own gamma correction, it would seem
> Emacs should still do gamma correction for images itself.  But perhaps
> it can do that in a more efficient way.
> 
>     nowadays), the whole pixel lookup and color allocation business is
>     utterly unnecessary, anyway, since one can directly map requested
>     color to available color
> 
> We could keep the ability to do the lookup but use it only on
> devices where it is needed.
> 
> Anyway, please do clean up this mess.

It probably would not be the best idea to separate color handling of
text and images too much, or we will not be able to have images blend
seamlessly into the background of the buffer, the images being
rendered to a different palette part than the "exact match" colors.

Anyhow, the way I see it there is not much sense in reinventing the
wheel.  This sort of color management is rather tedious to do in X11,
and the work has been done already.  For example, the Gdk library
deals with all sorts of different color models, and there is even a
Windows port (avaunt!) available if I am not mistaken.

So it would make sense either to use Gdk where available, or probably
to borrow from its code base _if_ copyright issues would permit
that.

I don't know whether it would make sense to factor out the color
management into separate files, thus maybe better facilitating
exchanging one scheme for another.

Opinions?

-- 
David Kastrup, Kriemhildstr. 15, 44793 Bochum




reply via email to

[Prev in Thread] Current Thread [Next in Thread]