From mboxrd@z Thu Jan 1 00:00:00 1970 Path: main.gmane.org!not-for-mail From: Jason Rumney Newsgroups: gmane.emacs.devel Subject: Re: Several suggestions for image support Date: Fri, 16 Apr 2004 13:50:22 +0100 Organization: Integra SP Ltd Sender: emacs-devel-bounces+emacs-devel=quimby.gnus.org@gnu.org Message-ID: <407FD68E.50908@gnu.org> References: NNTP-Posting-Host: deer.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii; format=flowed Content-Transfer-Encoding: 7bit X-Trace: sea.gmane.org 1082121599 31120 80.91.224.253 (16 Apr 2004 13:19:59 GMT) X-Complaints-To: usenet@sea.gmane.org NNTP-Posting-Date: Fri, 16 Apr 2004 13:19:59 +0000 (UTC) Cc: YAMAMOTO Mitsuharu , emacs-devel@gnu.org Original-X-From: emacs-devel-bounces+emacs-devel=quimby.gnus.org@gnu.org Fri Apr 16 15:19:49 2004 Return-path: Original-Received: from quimby.gnus.org ([80.91.224.244]) by deer.gmane.org with esmtp (Exim 3.35 #1 (Debian)) id 1BETG1-0004By-00 for ; Fri, 16 Apr 2004 15:19:49 +0200 Original-Received: from monty-python.gnu.org ([199.232.76.173]) by quimby.gnus.org with esmtp (Exim 3.35 #1 (Debian)) id 1BETG1-0005qc-00 for ; Fri, 16 Apr 2004 15:19:49 +0200 Original-Received: from localhost ([127.0.0.1] helo=monty-python.gnu.org) by monty-python.gnu.org with esmtp (Exim 4.30) id 1BETF7-000132-Vy for emacs-devel@quimby.gnus.org; Fri, 16 Apr 2004 09:18:53 -0400 Original-Received: from list by monty-python.gnu.org with tmda-scanned (Exim 4.30) id 1BETBn-00081X-DS for emacs-devel@gnu.org; Fri, 16 Apr 2004 09:15:27 -0400 Original-Received: from mail by monty-python.gnu.org with spam-scanned (Exim 4.30) id 1BESpn-00034B-5m for emacs-devel@gnu.org; Fri, 16 Apr 2004 08:53:14 -0400 Original-Received: from [209.61.173.204] (helo=integrasp.com) by monty-python.gnu.org with smtp (Exim 4.30) id 1BESnv-0002OC-3N for emacs-devel@gnu.org; Fri, 16 Apr 2004 08:50:47 -0400 Original-Received: (qmail 18017 invoked from network); 16 Apr 2004 12:36:20 -0000 Original-Received: from unknown (HELO ntserver.integrasp.com) (217.207.198.106) by 66.216.96.43 with SMTP; 16 Apr 2004 12:36:20 -0000 Original-Received: from gnu.org (altiojr.altio.com [192.168.111.196]) by ntserver.integrasp.com with SMTP (Microsoft Exchange Internet Mail Service Version 5.5.2653.13) id 2CQ68Z89; Fri, 16 Apr 2004 13:50:19 +0100 User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.0; en-US; rv:1.6) Gecko/20040113 X-Accept-Language: en-gb, en, ja Original-To: "Kim F. Storm" In-Reply-To: X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.4 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-devel-bounces+emacs-devel=quimby.gnus.org@gnu.org Xref: main.gmane.org gmane.emacs.devel:21754 X-Report-Spam: http://spam.gmane.org/gmane.emacs.devel:21754 Kim F. Storm wrote: > You are right. Shifting 8 bits here as well on X fixes transparent bg. > I will commit a fix for X shortly. > > However, on W32, it seems that it explicitly scales things to 16 bits > in both cases. I cannot test this on W32, so I cannot say what's > the right thing to do. The W32 port scales to 16 bits in places because the native Windows COLORREF is 8 bits, while Emacs XColor is 16 bits. So in this case, 8 bits is right, but alpha is currently coming out wrong. I suspect the use of COLOREF instead of XColor that you considered a bug when merging the image code (see comment around that location) was in fact not a bug. > Here is an easy way to test it -- after downloading the image you > mentioned: > > (insert-image (create-image "alphatest.png")) > > this should result in a light blue image with nice rounded > edges; a darker blue with rough edges indicates a problem. On Windows the image comes out with a black background and the image has rainbow colored stripes. Non-alpha PNGs look OK.