0

I'm trying to add WebP support to ImageMagick but it does not.

First I've installed libwebp 1.0.2 (https://developers.google.com/speed/webp/docs/compiling#building), so cwebp -q 80 image.png -o image.webp works correctly and the library's path exists in /lib/ld-linux.so.2

After I'm trying to configure ImageMagick with WebP support adding --with-webp=yes option. In some trials I used LDFLAGS=/usr/local/lib also but anyway log shows
WEBP --with-webp=yes no

for me it looks like IM conf not able to see webp libraries. If so how can I point IM to use existing WebP libraries or, please, guide me the right way to add WebP support to IM.

Thank you in advance!

Fasolechka
  • 34
  • 7
  • I do not know if this will help, but see https://imagemagick.org/script/formats.php and look at the comments for webp – fmw42 Jun 09 '19 at 17:32

1 Answers1

0

Have you got pkgconfig installed? If not, consider installing it and see if it finds the WEBP stuff with:

pkg-config --exists libwebp

If not, you can try adding to the PKG_CONFIG_PATH. So, if you find where you installed WEBP and look under that directory, you should find a file ending in .pc which holds the pkgconfig settings. Then add the containing directory to your PKG_CONFIG_PATH variable. So, if the web.pc is in /usr/freddy/frog/webp.pc, you need to do:

export PKG_CONFIG_PATH=$PKG_CONFIG_PATH:/usr/freddy/frog

Then try again to see if the command below works:

pkg-config --exists libwebp

Else, you can try setting the environment variables:

WEBP_CFLAGS
WEBP_LIBS

which will override the pkgconfig settings.

Mark Setchell
  • 191,897
  • 31
  • 273
  • 432