[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
bug#38310: 27.0.50; (image-convert "data" t) doesn't work
From: |
Lars Ingebrigtsen |
Subject: |
bug#38310: 27.0.50; (image-convert "data" t) doesn't work |
Date: |
Thu, 21 Nov 2019 13:55:48 +0100 |
User-agent: |
Gnus/5.13 (Gnus v5.13) Emacs/27.0.50 (gnu/linux) |
Katsumi Yamaoka <yamaoka@jpl.org> 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
bug#38310: 27.0.50; (image-convert "data" t) doesn't work, Lars Ingebrigtsen, 2019/11/21