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

From: Lars Ingebrigtsen <[email-masked]>
Date: Thu, 21 Nov 2019 13:55:48 +0100

Katsumi Yamaoka <[email-masked]> writes:

> Whereas (image-convert "file") works, (image-convert "data" t)
> causes an error as follows:
>
> (let ((image-converter 'graphicsmagick))
>   (image-convert "data" t))
> =>
> image-convert: /usr/bin/gm convert: Unable to open file (-) [No such
> file or directory].

Yeah, but that's not a valid call format.  As the doc string says

---
If IMAGE-FORMAT is non-nil, IMAGE is a string containing the
image data, and IMAGE-FORMAT is a symbol with a MIME format name
like "image/webp".
---

So you have to say

(image-convert "data" 'image/webp)

I'll rephrase the doc string, because it's not very well-written.

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