From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Miles Bader Newsgroups: gmane.emacs.devel Subject: Re: [PATCH 1/2] image: add support for GIF transparency Date: Fri, 05 Nov 2010 08:01:00 +0900 Message-ID: <87pquk7kyb.fsf@catnip.gol.com> References: <1288191651-3958-1-git-send-email-julien@danjou.info> NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain X-Trace: dough.gmane.org 1288911972 9239 80.91.229.12 (4 Nov 2010 23:06:12 GMT) X-Complaints-To: usenet@dough.gmane.org NNTP-Posting-Date: Thu, 4 Nov 2010 23:06:12 +0000 (UTC) Cc: Julien Danjou , emacs-devel@gnu.org To: YAMAMOTO Mitsuharu Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Fri Nov 05 00:06:07 2010 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.69) (envelope-from ) id 1PE8sd-0002qU-PY for ged-emacs-devel@m.gmane.org; Fri, 05 Nov 2010 00:06:03 +0100 Original-Received: from localhost ([127.0.0.1]:43536 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1PE8nv-0006J6-GT for ged-emacs-devel@m.gmane.org; Thu, 04 Nov 2010 19:01:11 -0400 Original-Received: from [140.186.70.92] (port=59742 helo=eggs.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1PE8nq-0006Ii-MJ for emacs-devel@gnu.org; Thu, 04 Nov 2010 19:01:07 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1PE8np-0005vx-3E for emacs-devel@gnu.org; Thu, 04 Nov 2010 19:01:06 -0400 Original-Received: from smtp12.dentaku.gol.com ([203.216.5.74]:60195) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1PE8no-0005vh-R7; Thu, 04 Nov 2010 19:01:05 -0400 Original-Received: from 123.230.98.87.eo.eaccess.ne.jp ([123.230.98.87] helo=catnip.gol.com) by smtp12.dentaku.gol.com with esmtpa (Dentaku) id 1PE8nl-0007SC-DT; Fri, 05 Nov 2010 08:01:01 +0900 Original-Received: by catnip.gol.com (Postfix, from userid 1000) id 40AC8DF8E; Fri, 5 Nov 2010 08:01:00 +0900 (JST) System-Type: x86_64-unknown-linux-gnu In-Reply-To: (YAMAMOTO Mitsuharu's message of "Thu, 04 Nov 2010 10:44:36 +0900") Original-Lines: 16 X-Virus-Scanned: ClamAV GOL (outbound) X-Abuse-Complaints: abuse@gol.com X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6 (newer, 3) 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:132380 Archived-At: YAMAMOTO Mitsuharu writes: >> + if (transparent_p && transparency_color_index == i) >> + pixel_colors[i] = FRAME_BACKGROUND_PIXEL (f); > > If we don't have multiple transparency levels in GIF (unlike PNG or > SVG), then we can construct a clipping mask as we currently do in XPM, > and that would give us a better result. A clipping mask might be a better solution even for PNG etc -- it will have exactly the same appearance on the default background, and will at least give a better approximation on non-default backgrounds... -Miles -- 97% of everything is grunge