Subject: Re: bug#38310: 27.0.50; (image-convert "data" t) doesn't work

From: Katsumi Yamaoka <[email-masked]>
Date: Mon, 25 Nov 2019 13:11:43 +0900

On Fri, 22 Nov 2019 13:16:11 +0100, Lars Ingebrigtsen wrote:
> Perhaps image-convert should signal an explicit error if the second
> parameter isn't on the proper format?

> I've now added some better error feedback on the trunk.

It looks useful for people like me.  Thanks.

I think it would be better if we can see what types are available
to convert before trying to convert no matter whether ImageMagick
is built-in.  The default value for `imagemagick-enabled-types'
looks old as it does not contain at least WEBP, and there is no
such one that can be used for GraphicsMagick.

The goal might be to make it enable a programmer to do this
without considering whether conversion is necessary or not:

(let ((type "image/webp"))
  (if (image-type-displayable-p type)
      (create-image "file-or-data" type nil-or-t)))

Regards,