From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!.POSTED.blaine.gmane.org!not-for-mail From: Eli Zaretskii Newsgroups: gmane.emacs.devel Subject: Re: Image transformations Date: Sun, 30 Jun 2019 18:12:11 +0300 Message-ID: <83blyff6pg.fsf@gnu.org> References: <838su3w0de.fsf@gnu.org> <20190616152259.GA22789@breton.holly.idiocy.org> <83d0jdv68i.fsf@gnu.org> <20190617211332.GA55597@breton.holly.idiocy.org> <83a7e6na26.fsf@gnu.org> <20190625183352.GA18019@breton.holly.idiocy.org> <838stplcgb.fsf@gnu.org> <83v9wri0yd.fsf@gnu.org> <20190628183604.GA51376@breton.holly.idiocy.org> <83imsph4kj.fsf@gnu.org> <20190629194959.GA71373@breton.holly.idiocy.org> Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit Injection-Info: blaine.gmane.org; posting-host="blaine.gmane.org:195.159.176.226"; logging-data="160416"; mail-complaints-to="usenet@blaine.gmane.org" Cc: emacs-devel@gnu.org To: Alan Third Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Sun Jun 30 17:14:56 2019 Return-path: Envelope-to: ged-emacs-devel@m.gmane.org Original-Received: from lists.gnu.org ([209.51.188.17]) by blaine.gmane.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.89) (envelope-from ) id 1hhbXb-000fcX-AS for ged-emacs-devel@m.gmane.org; Sun, 30 Jun 2019 17:14:55 +0200 Original-Received: from localhost ([::1]:45168 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.86_2) (envelope-from ) id 1hhbXa-0000MS-9J for ged-emacs-devel@m.gmane.org; Sun, 30 Jun 2019 11:14:54 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:33356) by lists.gnu.org with esmtp (Exim 4.86_2) (envelope-from ) id 1hhbV7-0007CQ-An for emacs-devel@gnu.org; Sun, 30 Jun 2019 11:12:22 -0400 Original-Received: from fencepost.gnu.org ([2001:470:142:3::e]:34930) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1hhbV6-0002xZ-UL; Sun, 30 Jun 2019 11:12:20 -0400 Original-Received: from [176.228.60.248] (port=1227 helo=home-c4e4a596f7) by fencepost.gnu.org with esmtpsa (TLS1.2:RSA_AES_256_CBC_SHA1:256) (Exim 4.82) (envelope-from ) id 1hhbV6-0008RM-3v; Sun, 30 Jun 2019 11:12:20 -0400 In-reply-to: <20190629194959.GA71373@breton.holly.idiocy.org> (message from Alan Third on Sat, 29 Jun 2019 20:49:59 +0100) X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.23 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" Xref: news.gmane.org gmane.emacs.devel:238256 Archived-At: > Date: Sat, 29 Jun 2019 20:49:59 +0100 > From: Alan Third > Cc: emacs-devel@gnu.org > > > This function is about the capabilities of a frame. AFAIK, in an > > Emacs built with ImageMagick support we will use ImageMagick for > > everything, unless the user somehow forces us not to, isn't that so? > > If so, the function is correct disregarding the image library in use, > > since if the caller wants a specific image library, that caller will > > have to figure out on their own what transformations are available. > > If I were to do: > > (insert-image (create-image "image.png")) > > Emacs will use libpng, whether or not ImageMagick is available. I > would have to force ImageMagick use. You may be thinking of > image-mode, which inserts ‘:type imagemagick’ if you rotate or scale > an image using the key bindings (+, -, r). So you are saying that a Lisp program needs to explicitly request ImageMagick if it wants to, say, rotate the image by 45 degrees? If so, I guess either the ImageMagick capabilities should not be part of the list we return, or the function should accept an additional argument which is the image type. The latter sounds like entering the area of diminishing returns, since if the caller needs to specify imagemagick as the type, then the caller already knows what will be returned as the value, right? So on balance, I think we should return a list of either 2 values or (on Windows 9X) 1 value, and that's it. WDYT?