emacs-devel
[Top][All Lists]
Advanced

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

Image-conversion shims


From: Lars Ingebrigtsen
Subject: Image-conversion shims
Date: Sat, 28 Sep 2019 22:06:29 +0200
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/27.0.50 (gnu/linux)

I suggested this in an unrelated bug report, but nobody probably saw it
there, so I'm bringing it up here again:

Emacs has approximate feature parity for the major image formats (JPEG,
PNG, etc) now with ImageMagick-enabled Emacs versions.  I think our
long-term plan is to obsolete the ImageMagick support completely,
because ImageMagick has some security issues.

However, the only way to support more obscure image formats (like BMP or
WebP) is currently to build with ImageMagick support, so it seems likely
to me that distributions are going to continue doing that.

So I wonder whether a way to speed up the transition to an
ImageMagick-less future would be to have a small package that would
convert "transparently" from formats we don't understand to formats we
do understand.

The only likely external conversion program is, unfortunately, "convert"
from ImageMagick, so there are still security implications, and a shim
like that isn't something we could have switched on by default.
However, we would be able to say to users who need to handle some BMP
images "set `use-external-image-formats' to t" instead of "build with
ImageMagick", and that would be a win, I think.  (Because Emacs would at
least segfault less.)

If that variable is t, and we don't have support for whatever image
format the user is trying to display, then `create-image' would use the
conversion package to basically run "convert" on the file first.  And
"convert -list format/magic" tell us what formats it supports, so it
could all be made to work automagically.

Thoughts?

-- 
(domestic pets only, the antidote for overdose, milk.)
   bloggy blog: http://lars.ingebrigtsen.no




reply via email to

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