emacs-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Linking to ImageMagick by default


From: Daniel Pittman
Subject: Re: Linking to ImageMagick by default
Date: Wed, 5 Dec 2018 13:27:01 -0500

On Wed, Dec 5, 2018 at 12:26 PM Glenn Morris <address@hidden> wrote:
Lars Ingebrigtsen wrote:

> Without image scaling, modes that display images become pretty
> worthless.

I think that is an issue that will vary from person to person.

This is ... mostly true, I guess, but I'm certainly in the "scaling is a requirement" bucket.
 
> I think the long term solution here is to implement image scaling in
> Emacs (probably not very hard) and then drop ImageMagick-by-default
> after that's been done.

Image scaling is ... a big tent, and depending on your tolerance for errors, and preference for which artifacts show up, can be reasonably complex to implement.  For example, the default with ImageMagick is adaptive; see https://github.com/ImageMagick/ImageMagick/blob/master/MagickCore/resize.c#L2344

To get the current behaviour you would need to implement the Mitchell-Netravali Cubic filter [1] and also the Lanczos 3-lobe Sinc-Sinc filter; those are not necessarily the best choices.  For those, see the discussion pages for ImageMagick on the subject:


The last gives a good explanation of the trade-offs, as does the first.  Personally, I would much rather buy than build that sort of image filtering logic. :)

Do you have an opinion of GraphicsMagick? 
It claims to be more stable and secure than ImageMagick.

It isn't wildly better in terms of security than ImageMagick is; for example, compare:

The most recommended "I want an imaging library with an extremely broad set of features, supporting most image types" option seems to be libvips, which provides similar features to ImageMagick, but has a better focus on security – especially recently – and a less troubled history.  Remember that popularity is a big driver of security vulnerability identification though, and IM is "the" solution in many popular web languages:

I guess that someone who knows the Emacs ImageMagick code could port it
to GraphicsMagick fairly easily. (I don't, and didn't, bug#14358).

Yes, that should be reasonably easy.  The compatibility of the API is fairly good, in my past experience.

reply via email to

[Prev in Thread] Current Thread [Next in Thread]