Take the 2-minute tour ×
Ask Ubuntu is a question and answer site for Ubuntu users and developers. It's 100% free, no registration required.

On Ubuntu 12.04 ImageMagick doesn't seem to support webp.

convert flyer.png flyer.webp

creates an png file with webp extension.

On https://developers.google.com/speed/webp/docs/using is stated that ImageMagick does support webp

convert --version Version: ImageMagick 6.6.9-7 2012-08-17 Q16

I have both:

  • libwebp-dev - Lossy compression of digital photographic images.
  • libwebp2 - Lossy compression of digital photographic images.

installed.

Also convert can't decode a webp file.

What's wrong, and is this an Ubuntu bug?

share|improve this question
    
You can list supported formats with convert -list format. On my system, with the same convert version, webp doesn't appear. –  chronitis Feb 6 '13 at 12:13
    
Thx, I created a bugreport on Launchpad. Then it can be fixed for us all. bugs.launchpad.net/ubuntu/+source/imagemagick/+bug/1117481 –  Janghou Feb 6 '13 at 16:42
    
This also affects debian 7 (wheezy), but they don't use launchpad for bugs. –  earthmeLon Jun 29 at 4:39

2 Answers 2

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
share|improve this answer
    
Thx, how can we correct this? –  Janghou Feb 6 '13 at 12:26
1  
If you want to fix it just for yourself, you can rebuild the package, I edited the answer to include the info. –  Dennis Kaarsemaker Feb 6 '13 at 12:32

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.

share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.