ImageMagick convert can't convert to webp

Fixed in 16.04

In 16.04 convert flyer.png flyer.webp does work, although webp is needed:

sudo apt-get install webp

Without webp installed, this error message will show:

convert: delegate failed `"cwebp" -quiet -q %Q "%i" -o "%o"' @ error/delegate.c/InvokeDelegate/1310.

The Ubuntu source package for imagemagick does not declare a build dependency on libwebp-dev. Thus imagemagick gets built without webp support. This could be considered a bug in Ubuntu.

Relevant output from the build process:

checking for WEBP... 
checking webp/decode.h usability... no
checking webp/decode.h presence... no
checking for webp/decode.h... no
checking for WebPDecodeRGB in -lwebp... no
checking if WEBP package is complete... no

And when libwebp-dev Install libwebp-dev is installed:

checking for WEBP... 
checking webp/decode.h usability... yes
checking webp/decode.h presence... yes
checking for webp/decode.h... yes
checking for WebPDecodeRGB in -lwebp... yes
checking if WEBP package is complete... yes

If you want to fix this just for yourself, you can rebuild the package and install your version:

cd /tmp
mkdir imagemagick
cd imagemagick
sudo apt-get build-dep imagemagick
sudo apt-get install libwebp-dev devscripts
apt-get source imagemagick
cd imagemagick-*
debuild -uc -us
sudo dpkg -i ../*magick*.deb

In the mean time one can install:

$ sudo apt-get install webp

And use dwebp and cwebp commands to decompress/compress from/to webp file format.