Subject: bug#10758: thumbs and image-dired to use built-in ImageMagick

From: Stefan Kangas <[email-masked]>
Date: Fri, 22 Oct 2021 23:57:42 -0700

Stefan Kangas <[email-masked]> writes:

> Glenn Morris <[email-masked]> writes:
>
>> Package: emacs
>> Version: 24.0.93
>> Severity: wishlist
>>
>> thumbs.el and image-dired.el both rely on using external ImageMagick
>> utilities to resize/rotate images.
>>
>> If Emacs was compiled with ImageMagick support, then images of
>> type imagemagick can be resized and rotated internally (see
>> image-transform-*). These modes should use the internal support if
>> it exists.
>
> So now that we have native image rotation and ImageMagick is on its
> way to become deprecated, I assume that this bug should be taken to
> mean that we want to use the built-in support here instead.

Hmm, looking closer at this, both thumbs.el and image-dired.el modifies
the actual image file.  This is something that our built-in support
can't do, as we only have support for reading images.

However, the ImageMagick library has these capabilities.  Given that we
no longer compile with ImageMagick by default, I don't think this
request makes any sense as it stands.  Perhaps we could implement the
in-memory rotation in addition to the modifying one that we have now,
but this is unlikely to be very useful.  If I rotate an image in an
image viewer, it is almost certainly because I want to update the file;
at least this is always the case in my use.

Jpeg images can of course be losslessly rotated by just modifying the
exif data, so implementing built-in support for rotating jpeg images
seems quite doable.  However, we would still not be able to drop the
external imagemagick dependency, because we would then also lose the
capability to rotate other image formats.

So perhaps this feature request is relevant anymore.  WDYT?