Sandeepan Nath
Sandeepan Nath

Reputation: 10284

imagick not converting webp format on Amazon Linux

imagick convert command is not working for this webp image -
https://lh3.googleusercontent.com/VRY0O_3L8VH2wxJSTiKPr72PeM5uhPPFEsHzzYdxenddpTI150M0TYpljnZisQaROR0=h256-rw -

convert -resize 50x50! https://lh3.googleusercontent.com/VRY0O_3L8VH2wxJSTiKPr72PeM5uhPPFEsHzzYdxenddpTI150M0TYpljnZisQaROR0=h256-rw /var/test_sandeepan/output.jpg

Output -

convert: no decode delegate for this image format `WEBP' @ error/constitute.c/ReadImage/535.

From this, I conclude that webp is either not supported by Imagick at all, or not supported by this version.

A link shared in this answer, talks about webp support along with imagemagick and php, so I thought imagick must be supporting webp as well, because PHP imagemagick, as per my understanding is nothing but a wrapper class to the imagick utility. Please correct me if I am wrong here.

Upvotes: 3

Views: 1706

Answers (1)

Danack
Danack

Reputation: 25701

I conclude that webp is either not supported by Imagick at all, or not supported by this version.

Imagick doesn't really do anything. All it does is convert PHP function calls into C function calls, to call the ImageMagick code through its 'wand' API.

If you want to have ImageMagick support webp, you will either need to install a version that has been compiled with webp support compiled in, or compile it yourself: http://www.imagemagick.org/script/advanced-unix-installation.php

You'll need to install libwebp-devel either from apt/yum, or from https://github.com/webmproject/libwebp as ImageMagick relies on that 'delegate' code being there to read/write webp images.

Upvotes: 1

Related Questions