From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: David Kastrup Newsgroups: gmane.emacs.devel Subject: Re: image scaling Date: Thu, 21 Feb 2008 11:01:48 +0100 Message-ID: <86zltusk4z.fsf@lola.quinscape.zz> References: NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: ger.gmane.org 1203588764 16954 80.91.229.12 (21 Feb 2008 10:12:44 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Thu, 21 Feb 2008 10:12:44 +0000 (UTC) Cc: emacs-devel@gnu.org To: Stefan Monnier Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Thu Feb 21 11:13:08 2008 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 1JS8QO-000159-5c for ged-emacs-devel@m.gmane.org; Thu, 21 Feb 2008 11:13:08 +0100 Original-Received: from localhost ([127.0.0.1] helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1JS8Ps-0007kB-SN for ged-emacs-devel@m.gmane.org; Thu, 21 Feb 2008 05:12:36 -0500 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1JS8FX-0000mB-J4 for emacs-devel@gnu.org; Thu, 21 Feb 2008 05:01:55 -0500 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1JS8FT-0000kP-DS for emacs-devel@gnu.org; Thu, 21 Feb 2008 05:01:52 -0500 Original-Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1JS8FS-0000k1-Se for emacs-devel@gnu.org; Thu, 21 Feb 2008 05:01:50 -0500 Original-Received: from mail.quinscape.de ([212.29.44.217]) by monty-python.gnu.org with esmtps (TLS-1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.60) (envelope-from ) id 1JS8FS-0005gO-AX for emacs-devel@gnu.org; Thu, 21 Feb 2008 05:01:50 -0500 Original-Received: (qmail-ldap/ctrl 9446 invoked from network); 21 Feb 2008 10:01:48 -0000 Original-Received: from unknown (HELO lola.quinscape.zz) ([10.0.3.43]) (envelope-sender ) by ns.quinscape.de (qmail-ldap-1.03) with SMTP for ; 21 Feb 2008 10:01:48 -0000 Original-Received: by lola.quinscape.zz (Postfix, from userid 1001) id 4F5EB8FA9A; Thu, 21 Feb 2008 11:01:48 +0100 (CET) In-Reply-To: (Stefan Monnier's message of "Wed, 20 Feb 2008 23:21:05 -0500") User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/23.0.60 (gnu/linux) X-AntiVirus: checked by AntiVir MailGate (version: 2.1.3-2; AVE: 7.6.0.67; VDF: 7.0.2.169; host: quinx) X-detected-kernel: by monty-python.gnu.org: 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:89806 Archived-At: Stefan Monnier writes: > Looking at the Elisp manual's "38.16.2 Image Descriptors", it seems that > we do not support image scaling. > > I'd like to add such a feature to image-mode.el, but am wondering how we > should go about doing it. Would there be some advantage to provide it > at the C level (e.g. if some of the image libs we use already provide > the necessary functionality) or should we just bite the bullet and call > some external tool like "convert -scale ..." (with the disadvantage that > flushing the image cache will not automatically cause the image to be > re-scaled). I think we should refactor image support somewhat: most image libraries offer some way of loading/displaying/scaling/gamma-correcting whole images (and where they don't, things like gdk might come in). Yet our code can't make use of that. There is a reason we need an "image cache" even though the normal image library functions would be quite fast enough to cope with stuff on the fly. Without refactoring the API, adding hand-spun scaling support will further complicate future refactoring. -- David Kastrup