emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
From: Marco Wahl <marcowahlsoft@gmail.com>
To: emacs-orgmode@gnu.org
Subject: Re: Use Emacs support for image resizing when using org-image-actual-width
Date: Thu, 29 Aug 2019 17:39:30 +0200	[thread overview]
Message-ID: <84v9ugf0b1.fsf@gmail.com> (raw)
In-Reply-To: 87k1aw9hvn.fsf@gmail.com

Hi Terje!

> 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.

I committed a fix to the master branch.  I think the way was clear.  But
testing is welcome as always.


Thanks,  Marco

      reply	other threads:[~2019-08-29 15:39 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-08-29 14:16 Use Emacs support for image resizing when using org-image-actual-width Terje Larsen
2019-08-29 15:39 ` Marco Wahl [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://www.orgmode.org/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=84v9ugf0b1.fsf@gmail.com \
    --to=marcowahlsoft@gmail.com \
    --cc=emacs-orgmode@gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).