[Top][All Lists]

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

Re: PNG pictures have gamma correction twice applied

From: Richard Stallman
Subject: Re: PNG pictures have gamma correction twice applied
Date: Tue, 03 Dec 2002 09:59:00 -0500

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

That is rather vague--could you be more concrete?  Are you saying that
Emacs does a spurious extra gamma correction for some of the other
image formats also?  If that is not what you mean then I have no idea
what the intended meaning is.

    It probably would not be the best idea to separate color handling of
    text and images too much,

Based on what you said before, we MUST separate them.
The PNG library does the gamma correction itself, whereas
for text Emacs has to do it.

It seems that there is only one correct thing to do, and that is make
Emacs *not* apply its own gamma correction to the images.  If that
means "separating" the color handling, then separate them we must.
What other alternative could there be?

                              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.

I cannot follow the logic of the argument you are trying to make.  As
far as I can see, eliminating the spurious extra gamma correction
will make text and images MORE compatible, not less so.

    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.

I doubt it would work to make Emacs use GDK all the time, but if you
can adapt the color management code from GDK, maybe we could make
Emacs call a stripped-down version of it.

But I think this is all irrelevant.  We are talking about eliminating
a duplicate gamma correction step.  That is a very simple issue to
think about.  Bringing in lots of other things makes a simple issue
complex, and that is an impediment to solving it.

Would you like to get rid of the extra gamma correction?

reply via email to

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