Questions and postings pertaining to the usage of ImageMagick regardless of the interface. This includes the command-line utilities, as well as the C and C++ APIs. Usage questions are like "How do I use ImageMagick to create drop shadows?".
I want to add webp support to my ImageMagick on Ubuntu Linux, and the "make install" is not a good way for me, if I want to keep easily maintainable my system. So I'm looking a way what is working with "apt-get install" and/or editing config files.
I installed the webp and libwebp-dev packages and it's dependencies.
After this I checked the /etc/ImageMagick/delegates.xml but nothing found about webp, so I insert this line:
IM v6.7.7-10 is massively old. Perhaps your version is patched.
Okay, you are using IM under perl, but what operation are you asking IM to do?
IM v6 uses "convert", and IM v7 uses "magick". That's why I asked what version IM.
Your "convert -list delegate" shows:
webp => "dwebp" -pam "%i" -o "%o"
... so IM will run dwepb when it is try to read (ie "decode") a webp file. But nothing is shown for writing (ie "encode") to webp. And that is what the error message is complaining about.
Linux versions are not always updated when a patch in included? What is the date associated with your version. Use convert -version on IM 6 and magick -version on IM 7. It will be next to the version number. I do not use WEBP but in my delegates.xml file on IM 6.9.10.12 Q16 Mac OSX Sierra, there is an entry for it:
fmw42 wrote: 2018-09-30T10:01:18-07:00
Linux versions are not always updated when a patch in included? What is the date associated with your version. Use convert -version on IM 6 and magick -version on IM 7. It will be next to the version number. I do not use WEBP but in my delegates.xml file on IM 6.9.10.12 Q16 Mac OSX Sierra, there is an entry for it:
Adding your line to delegates.xml works fine for me.
IM is clearly trying to run your delegate, but failing. Perhaps you need special privileges from perl. Does perl run the command from your account, with your normal privileges?
I suggest you remove "-quiet" from your delegate, while testing. If you can access the IM command, adding "-verbose" may give a clue. Failing that, try "-debug all".
snibgo wrote: 2018-09-30T12:44:42-07:00
IM is clearly trying to run your delegate, but failing. Perhaps you need special privileges from perl. Does perl run the command from your account, with your normal privileges?
I treied to run as root. Perl run under root privileges in this case.
snibgo wrote: 2018-09-30T12:44:42-07:00
I suggest you remove "-quiet" from your delegate, while testing. If you can access the IM command, adding "-verbose" may give a clue. Failing that, try "-debug all".
webp:
Error! Could not process file /tmp/magick-WQfRMvi9
Error! Cannot read input picture file '/tmp/magick-WQfRMvi9'
Image::Magick error: Exception 415: delegate failed `"cwebp" "%i" -o "%o"' @ error/delegate.c/InvokeDelegate/1065 (2.webp)
I think perl read the JPG file and dump it into the /tmp directory (it has rwx permission on directory), but can't read it. I checked the file in /tmp and wasn't there. Maybe it is created but I can't catch is.