From mboxrd@z Thu Jan 1 00:00:00 1970 From: Rasmus Subject: Re: proposed modification of org-display-inline-images Date: Mon, 25 Jul 2016 12:18:18 +0200 Message-ID: <87eg6ihvh1.fsf@gmx.us> References: Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit Return-path: Received: from eggs.gnu.org ([2001:4830:134:3::10]:59768) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1bRcyA-00048N-5n for emacs-orgmode@gnu.org; Mon, 25 Jul 2016 06:18:43 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1bRcy5-0002Jg-2N for emacs-orgmode@gnu.org; Mon, 25 Jul 2016 06:18:41 -0400 Received: from plane.gmane.org ([80.91.229.3]:54469) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1bRcy4-0002JU-RP for emacs-orgmode@gnu.org; Mon, 25 Jul 2016 06:18:36 -0400 Received: from list by plane.gmane.org with local (Exim 4.69) (envelope-from ) id 1bRcy2-0007oX-Pv for emacs-orgmode@gnu.org; Mon, 25 Jul 2016 12:18:34 +0200 Received: from ip-178-203-233-224.hsi10.unitymediagroup.de ([178.203.233.224]) by main.gmane.org with esmtp (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Mon, 25 Jul 2016 12:18:34 +0200 Received: from rasmus by ip-178-203-233-224.hsi10.unitymediagroup.de with local (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Mon, 25 Jul 2016 12:18:34 +0200 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 Hi, Thanks for the proposal. John Kitchin writes: > I would like to propose a change to org-display-inline-images so it can > rescale images even if imagemagick is not built in to emacs. There is > currently no way to rescale images when they are displayed in that case > AFAICS. This is particularly a problem on Windows, as we have never > found a binary linked to imagemagick for that platform. This sounds like an Emacs problem. There was some talk about the rescaling issue here: http://thread.gmane.org/gmane.emacs.devel/174318/ And maybe here: http://thread.gmane.org/gmane.emacs.devel/200568/focus=203024 > I propose we define a new customizable variable called something like > org-inline-image-resize-function, and a function that takes a filename > and the resize options, and returns a path to a resized function (in the > temporary directory). The variable isn't technically necessary, but if > someone wanted to use an alternative function, it would enable it. > > This function would use the "convert" program from imagemagick to do the > resizing. This program can be installed independently on all the > platforms I think. Why limit this to Org? A solution should be implemented in image.el. > Since this is just for display in org, I suggest that we use a syntax like: > > #+attr_org: :resize resize-options > [[./file.png]] > > the resize-options could be anything here: > http://www.imagemagick.org/script/command-line-processing.php#geometry > > It would enable things like: > > reduce size by 50% > #+attr_org: :resize 50% > > set width to 300, preserving aspect ratio > #+attr_org: :resize 300 > > set height to 200, and preserve aspect ratio > #+attr_org: :resize x200 > > set size to 200x300 and change aspect ratio > #+attr_org: :resize 200x300! > > Any thoughts on this proposal? This is misusing attr_org, isn’t it? Don’t particularly care for this "API"... All is IMO, of course. Rasmus -- I almost cut my hair, it happened just the other day