From mboxrd@z Thu Jan 1 00:00:00 1970 Path: main.gmane.org!not-for-mail From: David.Kastrup@t-online.de (David Kastrup) Newsgroups: gmane.emacs.devel Subject: Re: PNG pictures have gamma correction twice applied Date: Sat, 30 Nov 2002 14:36:14 +0100 Sender: emacs-devel-admin@gnu.org Message-ID: <200211301336.gAUDaEU9005748@localhost.localdomain> References: <200211061556.gA6FuCU6005082@localhost.localdomain> NNTP-Posting-Host: main.gmane.org X-Trace: main.gmane.org 1038663470 24631 80.91.224.249 (30 Nov 2002 13:37:50 GMT) X-Complaints-To: usenet@main.gmane.org NNTP-Posting-Date: Sat, 30 Nov 2002 13:37:50 +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 18I7oZ-0006Oz-00 for ; Sat, 30 Nov 2002 14:37:47 +0100 Original-Received: from monty-python.gnu.org ([199.232.76.173]) by quimby.gnus.org with esmtp (Exim 3.12 #1 (Debian)) id 18I7wd-00030f-00 for ; Sat, 30 Nov 2002 14:46:07 +0100 Original-Received: from localhost ([127.0.0.1] helo=monty-python.gnu.org) by monty-python.gnu.org with esmtp (Exim 4.10) id 18I7oR-00065P-00; Sat, 30 Nov 2002 08:37:39 -0500 Original-Received: from list by monty-python.gnu.org with tmda-scanned (Exim 4.10) id 18I7nM-0004T8-00 for emacs-devel@gnu.org; Sat, 30 Nov 2002 08:36:32 -0500 Original-Received: from mail by monty-python.gnu.org with spam-scanned (Exim 4.10) id 18I7nK-0004Sv-00 for emacs-devel@gnu.org; Sat, 30 Nov 2002 08:36:31 -0500 Original-Received: from mailout10.sul.t-online.com ([194.25.134.21]) by monty-python.gnu.org with esmtp (Exim 4.10) id 18I7nI-0004RP-00; Sat, 30 Nov 2002 08:36:28 -0500 Original-Received: from fwd04.sul.t-online.de by mailout10.sul.t-online.com with smtp id 18I7nH-0000zW-04; Sat, 30 Nov 2002 14:36:27 +0100 Original-Received: from localhost.localdomain (520018396234-0001@[62.226.11.242]) by fwd04.sul.t-online.com with esmtp id 18I7n6-1GUMVsC; Sat, 30 Nov 2002 14:36:16 +0100 Original-Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by localhost.localdomain (8.12.5/8.12.5) with ESMTP id gAUDaE7R005752; Sat, 30 Nov 2002 14:36:14 +0100 Original-Received: (from dak@localhost) by localhost.localdomain (8.12.5/8.12.5/Submit) id gAUDaEU9005748; Sat, 30 Nov 2002 14:36:14 +0100 Original-To: rms@gnu.org X-Sender: 520018396234-0001@t-dialin.net 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:9756 X-Report-Spam: http://spam.gmane.org/gmane.emacs.devel:9756 Richard Stallman 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