From mboxrd@z Thu Jan 1 00:00:00 1970 From: Terje Larsen Subject: Use Emacs support for image resizing when using org-image-actual-width Date: Thu, 29 Aug 2019 16:16:28 +0200 Message-ID: <87k1aw9hvn.fsf@gmail.com> Mime-Version: 1.0 Content-Type: text/plain Return-path: Received: from eggs.gnu.org ([209.51.188.92]:35566) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1i3LE6-0007CQ-8U for emacs-orgmode@gnu.org; Thu, 29 Aug 2019 10:16:39 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1i3LE5-0002ZV-5H for emacs-orgmode@gnu.org; Thu, 29 Aug 2019 10:16:38 -0400 Received: from mail-lf1-x12f.google.com ([2a00:1450:4864:20::12f]:36152) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1i3LE4-0002XK-ST for emacs-orgmode@gnu.org; Thu, 29 Aug 2019 10:16:37 -0400 Received: by mail-lf1-x12f.google.com with SMTP id r5so2679535lfc.3 for ; Thu, 29 Aug 2019 07:16:36 -0700 (PDT) Received: from beetle ([2a00:801:3f2:f2ce:8ce1:3500:8949:d57e]) by smtp.gmail.com with ESMTPSA id g28sm25500lja.89.2019.08.29.07.16.32 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 29 Aug 2019 07:16:33 -0700 (PDT) List-Id: "General discussions about Org-mode." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org Sender: "Emacs-orgmode" To: emacs-orgmode@gnu.org I am running Emacs version 27 (building from master) and recently noticed that my images no longer scales using org-image-actual-width. I then read that ImageMagick support is no longer enabled by default as there is a new "native" resizing method built-in to Emacs. As seen in the news for on Emacs version 27 (master branch): > ** Emacs no longer defaults to using ImageMagick to display images, > due to security and stability concerns. To override the default, use > 'configure --with-imagemagick'. As well as: > ** Emacs now supports resizing and rotating images without ImageMagick. > All modern systems support this feature. (On GNU and Unix systems, > Cairo drawing or the XRender extension to X11 is required for this to > be available; the configure script will test for it and, if found, > enable scaling.) > The new function 'image-transforms-p' can be used to test whether any > given frame supports these capabilities. I then inspected the code of org-mode and noticed there is an expression in the cond that figures out how to scale, e.g.: > ((not (image-type-available-p 'imagemagick)) nil) I haven't looked into yet how the scaling is done, but I know some other modes such as image-mode had support for using the new method. I think it would be great to support the native scaling option as well when available. Since opting in to imagemagick will be Emacs wide and then we loose the benefit of the new functionality. Best regards, Terje Larsen