From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Chong Yidong Newsgroups: gmane.emacs.devel Subject: Re: [sdl.web@gmail.com: Re: problem with transparent PNG image display] Date: Mon, 06 Aug 2007 12:05:24 -0400 Message-ID: <877io8fy2j.fsf@stupidchicken.com> References: <46A527C9.7040401@gnu.org> NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: sea.gmane.org 1186416689 1244 80.91.229.12 (6 Aug 2007 16:11:29 GMT) X-Complaints-To: usenet@sea.gmane.org NNTP-Posting-Date: Mon, 6 Aug 2007 16:11:29 +0000 (UTC) Cc: emacs-devel@gnu.org To: rms@gnu.org Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Mon Aug 06 18:11:27 2007 Return-path: Envelope-to: ged-emacs-devel@m.gmane.org Original-Received: from lists.gnu.org ([199.232.76.165]) by lo.gmane.org with esmtp (Exim 4.50) id 1II5B0-0008QV-0A for ged-emacs-devel@m.gmane.org; Mon, 06 Aug 2007 18:11:26 +0200 Original-Received: from localhost ([127.0.0.1] helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1II5Al-0002HS-4n for ged-emacs-devel@m.gmane.org; Mon, 06 Aug 2007 12:11:11 -0400 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1II585-0001JG-LZ for emacs-devel@gnu.org; Mon, 06 Aug 2007 12:08:25 -0400 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1II581-0001Hb-Uj for emacs-devel@gnu.org; Mon, 06 Aug 2007 12:08:25 -0400 Original-Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1II581-0001HW-OO for emacs-devel@gnu.org; Mon, 06 Aug 2007 12:08:21 -0400 Original-Received: from cyd.mit.edu ([18.115.2.24]) by monty-python.gnu.org with esmtp (Exim 4.60) (envelope-from ) id 1II57g-0001gL-U3; Mon, 06 Aug 2007 12:08:01 -0400 Original-Received: by cyd.mit.edu (Postfix, from userid 1000) id 0D1414E35D; Mon, 6 Aug 2007 12:05:24 -0400 (EDT) In-Reply-To: (Richard Stallman's message of "Wed\, 01 Aug 2007 10\:30\:38 -0400") User-Agent: Gnus/5.11 (Gnus v5.11) Emacs/22.1.50 (gnu/linux) X-Detected-Kernel: Linux 2.6 (newer, 1) X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Original-Sender: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Errors-To: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.devel:76092 Archived-At: Richard Stallman writes: > When no background color is saved in the image, we render using the > background color of the face the image is first drawn with, so the > problem is not immediately apparent with those images, but if you draw > the same image object onto a different colored background, you will see > the same problem occur. > > The cache could record what background color was used for rendering. > Then, on displaying the image again, if the desired background is > different, that could cause a cache-mismatch, which would cause > re-rendering. There is code to handle this in the trunk, but not in the branch. I just changed the trunk code further to ignore the background color specified by the png image (now that Emacs can properly handle transparency, it is more correct to always use the frame background). If you want this bug resolved for Emacs 22, it will be necessary to port both changes from the trunk. I think it should be moderately safe.