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: Thu, 07 Nov 2002 10:08:45 -0500 Sender: emacs-devel-admin@gnu.org Message-ID: References: <200211061556.gA6FuCU6005082@localhost.localdomain> Reply-To: rms@gnu.org NNTP-Posting-Host: main.gmane.org X-Trace: main.gmane.org 1036683193 29654 80.91.224.249 (7 Nov 2002 15:33:13 GMT) X-Complaints-To: usenet@main.gmane.org NNTP-Posting-Date: Thu, 7 Nov 2002 15:33:13 +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 189oec-0007i4-00 for ; Thu, 07 Nov 2002 16:33:10 +0100 Original-Received: from monty-python.gnu.org ([199.232.76.173]) by quimby.gnus.org with esmtp (Exim 3.12 #1 (Debian)) id 189one-0003AK-00 for ; Thu, 07 Nov 2002 16:42:31 +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 189oex-00007T-00; Thu, 07 Nov 2002 10:33:31 -0500 Original-Received: from list by monty-python.gnu.org with tmda-scanned (Exim 4.10) id 189oH5-0001S1-00 for emacs-devel@gnu.org; Thu, 07 Nov 2002 10:08:51 -0500 Original-Received: from mail by monty-python.gnu.org with spam-scanned (Exim 4.10) id 189oH0-0001Pz-00 for emacs-devel@gnu.org; Thu, 07 Nov 2002 10:08:50 -0500 Original-Received: from fencepost.gnu.org ([199.232.76.164]) by monty-python.gnu.org with esmtp (Exim 4.10) id 189oGz-0001Ph-00 for emacs-devel@gnu.org; Thu, 07 Nov 2002 10:08:45 -0500 Original-Received: from rms by fencepost.gnu.org with local (Exim 4.10) id 189oGz-0007ti-00; Thu, 07 Nov 2002 10:08:45 -0500 Original-To: David.Kastrup@t-online.de In-reply-to: <200211061556.gA6FuCU6005082@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:9225 X-Report-Spam: http://spam.gmane.org/gmane.emacs.devel:9225 When a PNG image is displayed, first all the gamma correction factors of the screen and image are taken into account, and the PNG library is called with that information. The resulting color triples are in properly gamma-adjusted 24bit color space, ready for putting on the screen. Is the same thing true for other image formats, or only for PNG? Then Emacs looks up every pixel in a lookup table, and if it does not find it there, it again does gamma correction and other stuff. The fix would seem to be to delete the second gamma correction. The two hard questions are (1) where this code is and (2) whether the change needs to be made for all image formats or just for PNG. It sounds like you know the answer to (1). Could you tell us? Would someone like to investigate the answer to (2)?