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:29:47 +0100 Organization: Integra SP Ltd Sender: emacs-devel-bounces+emacs-devel=quimby.gnus.org@gnu.org Message-ID: <407FD1BB.9070802@gnu.org> References: <407FBEFB.8090604@gnu.org> 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 1082122361 757 80.91.224.253 (16 Apr 2004 13:32:41 GMT) X-Complaints-To: usenet@sea.gmane.org NNTP-Posting-Date: Fri, 16 Apr 2004 13:32:41 +0000 (UTC) Cc: emacs-devel@gnu.org, "Kim F. Storm" Original-X-From: emacs-devel-bounces+emacs-devel=quimby.gnus.org@gnu.org Fri Apr 16 15:32:28 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 1BETSG-0005DT-00 for ; Fri, 16 Apr 2004 15:32:28 +0200 Original-Received: from monty-python.gnu.org ([199.232.76.173]) by quimby.gnus.org with esmtp (Exim 3.35 #1 (Debian)) id 1BETSG-00064c-00 for ; Fri, 16 Apr 2004 15:32:28 +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 1BETRM-0001Js-Na for emacs-devel@quimby.gnus.org; Fri, 16 Apr 2004 09:31:32 -0400 Original-Received: from list by monty-python.gnu.org with tmda-scanned (Exim 4.30) id 1BETQi-0001B0-61 for emacs-devel@gnu.org; Fri, 16 Apr 2004 09:30:52 -0400 Original-Received: from mail by monty-python.gnu.org with spam-scanned (Exim 4.30) id 1BETQ6-0000uO-Bm for emacs-devel@gnu.org; Fri, 16 Apr 2004 09:30:45 -0400 Original-Received: from [209.61.173.204] (helo=integrasp.com) by monty-python.gnu.org with smtp (Exim 4.30) id 1BETQ5-0000u0-RY for emacs-devel@gnu.org; Fri, 16 Apr 2004 09:30:14 -0400 Original-Received: (qmail 17663 invoked from network); 16 Apr 2004 12:15:46 -0000 Original-Received: from unknown (HELO ntserver.integrasp.com) (217.207.198.106) by 66.216.96.43 with SMTP; 16 Apr 2004 12:15:46 -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 2CQ68Z87; Fri, 16 Apr 2004 13:29:44 +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: David Kastrup 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:21759 X-Report-Spam: http://spam.gmane.org/gmane.emacs.devel:21759 David Kastrup wrote: > Hmmm. Do you have any evidence of it working? When I wrote the image support for Windows, I tested a wide range of PNG test images. PNG support appears to be broken in the Windows port now though, as all images with transparency or alpha channels are appearing inverted. This may be something to do with the bug that YAMAMOTO Mitsuharu just pointed out. > Anyway: if :heuristic-mask is true, but the majority of corner pixels > is transparent, it would be nice if just transparency was used as the > mask criterion. > > That way I get at least a heuristic mask if the image > creating process does not support transparency, but get the > transparence if it is available in the image. It is not always easy > to know in advance. I see the problem. You don't want to have to know in advance whether the image has transparency or not. What about: if the image already has a mask (due to the fact it is a transparent image), any heuristic mask property should be ignored. Would that be better than relying on corner pixels being transparent?