From mboxrd@z Thu Jan 1 00:00:00 1970 Path: main.gmane.org!not-for-mail From: Richard Stallman Newsgroups: gmane.emacs.devel Subject: Re: PNG pictures have gamma correction twice applied Date: Tue, 03 Dec 2002 09:59:00 -0500 Sender: emacs-devel-admin@gnu.org Message-ID: References: <200211061556.gA6FuCU6005082@localhost.localdomain> <200211301336.gAUDaEU9005748@localhost.localdomain> Reply-To: rms@gnu.org NNTP-Posting-Host: main.gmane.org X-Trace: main.gmane.org 1038927807 5758 80.91.224.249 (3 Dec 2002 15:03:27 GMT) X-Complaints-To: usenet@main.gmane.org NNTP-Posting-Date: Tue, 3 Dec 2002 15:03:27 +0000 (UTC) Cc: emacs-devel@gnu.org Return-path: Original-Received: from quimby.gnus.org ([80.91.224.244]) by main.gmane.org with esmtp (Exim 3.35 #1 (Debian)) id 18JEa2-0001UU-00 for ; Tue, 03 Dec 2002 16:03:22 +0100 Original-Received: from monty-python.gnu.org ([199.232.76.173]) by quimby.gnus.org with esmtp (Exim 3.12 #1 (Debian)) id 18JEja-0002q1-00 for ; Tue, 03 Dec 2002 16:13:14 +0100 Original-Received: from localhost ([127.0.0.1] helo=monty-python.gnu.org) by monty-python.gnu.org with esmtp (Exim 4.10.13) id 18JEWq-0003oC-00; Tue, 03 Dec 2002 10:00:04 -0500 Original-Received: from list by monty-python.gnu.org with tmda-scanned (Exim 4.10.13) id 18JEVr-0003XO-00 for emacs-devel@gnu.org; Tue, 03 Dec 2002 09:59:03 -0500 Original-Received: from mail by monty-python.gnu.org with spam-scanned (Exim 4.10.13) id 18JEVo-0003Sl-00 for emacs-devel@gnu.org; Tue, 03 Dec 2002 09:59:02 -0500 Original-Received: from fencepost.gnu.org ([199.232.76.164]) by monty-python.gnu.org with esmtp (Exim 4.10.13) id 18JEVo-0003SZ-00 for emacs-devel@gnu.org; Tue, 03 Dec 2002 09:59:00 -0500 Original-Received: from rms by fencepost.gnu.org with local (Exim 4.10) id 18JEVo-000649-00; Tue, 03 Dec 2002 09:59:00 -0500 Original-To: David.Kastrup@t-online.de In-reply-to: <200211301336.gAUDaEU9005748@localhost.localdomain> (David.Kastrup@t-online.de) Errors-To: emacs-devel-admin@gnu.org X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.0.11 Precedence: bulk List-Help: List-Post: List-Subscribe: , List-Id: Emacs development discussions. List-Unsubscribe: , List-Archive: Xref: main.gmane.org gmane.emacs.devel:9829 X-Report-Spam: http://spam.gmane.org/gmane.emacs.devel:9829 > 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?