From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Andreas Politz Newsgroups: gmane.emacs.devel Subject: Re: new image-type: composite, or not Date: Wed, 30 Jan 2013 20:14:17 +0100 Message-ID: <87pq0m4h6e.fsf@fh-trier.de> References: <87y5ffsvg3.fsf@fh-trier.de> NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain X-Trace: ger.gmane.org 1359573292 21370 80.91.229.3 (30 Jan 2013 19:14:52 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Wed, 30 Jan 2013 19:14:52 +0000 (UTC) Cc: emacs-devel@gnu.org To: Stefan Monnier Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Wed Jan 30 20:15:12 2013 Return-path: Envelope-to: ged-emacs-devel@m.gmane.org Original-Received: from lists.gnu.org ([208.118.235.17]) by plane.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1U0d7f-0001Y3-Us for ged-emacs-devel@m.gmane.org; Wed, 30 Jan 2013 20:15:04 +0100 Original-Received: from localhost ([::1]:38236 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1U0d7N-0000sR-5k for ged-emacs-devel@m.gmane.org; Wed, 30 Jan 2013 14:14:45 -0500 Original-Received: from eggs.gnu.org ([208.118.235.92]:44902) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1U0d7I-0000s4-CX for emacs-devel@gnu.org; Wed, 30 Jan 2013 14:14:43 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1U0d7E-0005xJ-Lu for emacs-devel@gnu.org; Wed, 30 Jan 2013 14:14:40 -0500 Original-Received: from gateway-b.fh-trier.de ([143.93.54.182]:46331) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1U0d7E-0005ws-Bh for emacs-devel@gnu.org; Wed, 30 Jan 2013 14:14:36 -0500 X-Virus-Scanned: by Amavisd-new + McAfee uvscan + ClamAV [Rechenzentrum Hochschule Trier] Original-Received: from luca (dslb-088-068-046-246.pools.arcor-ip.net [88.68.46.246]) (using TLSv1 with cipher AES256-SHA (256/256 bits)) (No client certificate requested) (Authenticated sender: politza) by gateway-b.fh-trier.de (Postfix) with ESMTPSA id BBA3C17B468; Wed, 30 Jan 2013 20:14:18 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha1; c=simple/simple; d=fh-trier.de; s=default; t=1359573258; bh=y5qLxhoN0/cgoJGR6MdxJQLDn0k=; h=From:To:Cc:Subject:References:Date:In-Reply-To:Message-ID: MIME-Version:Content-Type; b=jEySctv6nt2/p3DMCy5hdi2sbrDYkAnQWmplKPzExLYcWxGaiUPfDMiGjxqipEV42 JNypFpwCrnlDrxANPi+J5RWvH6VSHTCvc75ummbc5R/uiPghpi9U8aPWlNhD9lrhgM 80auHhYmPt0V/L/Nq9Rm0lxYrT7/d+yhwLg70pho= Original-Received: from localhost ([127.0.0.1] helo=luca) by luca with esmtp (Exim 4.72) (envelope-from ) id 1U0d6v-0008OU-Hl; Wed, 30 Jan 2013 20:14:17 +0100 In-Reply-To: (Stefan Monnier's message of "Wed, 30 Jan 2013 12:28:48 -0500") User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/24.2.50 (gnu/linux) X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6.x X-Received-From: 143.93.54.182 X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Original-Sender: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.devel:156717 Archived-At: Stefan Monnier writes: > What does it look like? E.g. can you highlight the text without > obscuring it? http://public.fh-trier.de/~politza/emacs/pdf-isearch.png Because of anti-aliasing, the background is not merely a single color, such that my (single-color) mask is not perfect. `convert' seems to do some fuzzy comparing of colors by default. > >> Alas, all this made me realize, that maybe a simpler approach would >> suffice. Something like a single function >> (mark-image foreground background &rest edges-list) > > I'm not sure exactly how that would work, can you give some details? > This kind of function was what I was looking for. I have a list of rectangles ((x0 y0 x1 y1)...) and want to ,,fontify'' the image at these places. I don't know. I just thought, that maybe this kind of low-level tinkering with images, masks and slices is not really needed and maybe it does not really fit nicely in the current image-framework. If that is true, then some more high-level function could simplify an implementation or make it cleaner. Using libmagick instead of X11 is something else to consider. >> which does not have the side-effect of reloading the image. > > Why does the composite type need to reload the image? > No it doesn't. I just stated an imported feature, this supposed mark-image function would need to have. > Not sure what other candidates there can be, neither for mark-image nor > for a composite image. > Well, customizing tree-widgets images... -AP