On Ubuntu 12.04 ImageMagick doesn't seem to support webp.
convert flyer.png flyer.webp
Creates a png file with webp extension.
On webp docs is stated that ImageMagick does support webp
$ convert --version`
Version: ImageMagick 6.6.9-7 2012-08-17 Q16
I have these both installed:
libwebp-dev
- Lossy compression of digital photographic images.libwebp2
- Lossy compression of digital photographic images.
Also, convert can't decode a webp file.
What's wrong, and is this an Ubuntu bug?
Fixed in 16.04
In 16.04
convert flyer.png flyer.webp
does work, althoughwebp
is needed:Without
webp
installed, this error message will show: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:
And when libwebp-dev is installed:
If you want to fix this just for yourself, you can rebuild the package and install your version:
In the mean time one can install:
And use
dwebp
andcwebp
commands to decompress/compress from/to webp file format.WebP support also has some issues with transparency before 6.8.3, so I've used 6.8.9-9 from 15.04 Vivid, and backported it to 14.04 Trusty with webp support. Use at your own risk:
In case you wish to repeat this, the steps were:
backportpackage imagemagick --source vivid --destination trusty --workdir=imagemagick-backport
to fetch vivid's version andtar -xf
to extract the.deb
.debian/control
replacingdpkg-dev (>= 1.17.6)
dependency, adding dependencies forlibwebp-dev
and replacingArchitecture: any
withamd64
to avoid build failures.--with-webp
indebian/rules
, adding a changelog entry withdch
and usingdebuild -S -sd
to build a source only package.