unofficial mirror of emacs-devel@gnu.org 
 help / color / mirror / code / Atom feed
From: Richard Stallman <rms@gnu.org>
Cc: emacs-devel@gnu.org
Subject: Re: PNG pictures have gamma correction twice applied
Date: Tue, 03 Dec 2002 09:59:00 -0500	[thread overview]
Message-ID: <E18JEVo-000649-00@fencepost.gnu.org> (raw)
In-Reply-To: <200211301336.gAUDaEU9005748@localhost.localdomain> (David.Kastrup@t-online.de)

    > 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	other threads:[~2002-12-03 14:59 UTC|newest]

Thread overview: 15+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <200211061556.gA6FuCU6005082@localhost.localdomain>
2002-11-07 15:08 ` PNG pictures have gamma correction twice applied Richard Stallman
2002-11-09 22:40   ` David Kastrup
2002-11-11 10:20     ` Richard Stallman
2002-11-30 13:36       ` David Kastrup
2002-12-03 14:59         ` Richard Stallman [this message]
2002-12-03 15:21           ` David Kastrup
2002-12-05 15:08             ` Richard Stallman
2002-12-05 15:34               ` David Kastrup
2002-12-05 17:31               ` David Kastrup
2002-12-06 15:52                 ` Richard Stallman
2002-12-06 16:01                   ` David Kastrup
2002-11-11 16:58     ` Stefan Monnier
2002-11-11 17:30       ` David Kastrup
2002-11-11 17:43         ` Stefan Monnier
2002-11-18 11:31           ` David Kastrup

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://www.gnu.org/software/emacs/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=E18JEVo-000649-00@fencepost.gnu.org \
    --to=rms@gnu.org \
    --cc=emacs-devel@gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/emacs.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).