WEBP export no longer works

Goodnight all.
I have the latest version of ART and I’m using Manjaro Linux.
I can no longer save my photos in webP.
I have an error saving the file.

I use the following files:
The exr.txt file

[ART ImageIO]
Extension=exr
ReadCommand=./magick-io.sh load
WriteCommand=./magick-io.sh save
Label=EXR (via ImageMagick)

The magick-io.sh file:

#!/bin/bash
fashion=$1
shift
if [ "$mode" = "load" ]; then
# loading: convert from the input to a floating-point tiff file
# resize if hints are given
sz="" if [ "$4" != "" -a "$3" != "0" -a "$4" != "0" ]; then
sz="-thumbnail $3x$4"
fi
magick convert "$1" $sz -colorspace sRGB -depth 32 -compress none "$2"
test -f "$2"
elif [ "$mode" = "save" ]; then
# saving: convert from floating-point tiff to the output
magick convert "$1" "$2" if [ -f "$2" ]; then
# copy also the metadata with exiv2
exiv2 -ea- "$1" | exiv2 -ia- "$2"
fi
test -f "$2"
else
# unknown operating mode, exit with error
echo "Unknown operating mode \"$mode\"!"
exit 1
fi

And the webp.txt file:


[ART ImageIO]
Extension=webp
ReadCommand=./magick-io.sh load
WriteCommand=./magick-io.sh save
Label=WebP (via ImageMagick)

Can someone help me ?
Thank you.
Ignace.

Hi:

There should be a newline (or a ; if you don’t care much about readability) before the if in the above

Hello, agriggio.
Thanks for your help.
I have modified the script but I still get the file saving error message.
Here is my new script:

#!/bin/bash
mode=$1
shift
if [ "$mode" = "load" ] ; then
# load: convert the input to a floating point tiff file
# resize if indications are given
sz=""
if [ "$4" != "" -a "$3" != "0" -a "$4" != "0" ] ; then
sz="-thumbnail $3x$4"
fi
magick convert "$1" $sz -colorspace sRGB -depth 32 -compress none "$2"
test -f "$2 "
elif [ "$mode" = "save" ] ; then
# save : convert tiff to floating point to output
magick convert "$1" "$2"
if [ -f "$2" ] ; then
# copy also metadata with exiv2
exiv2 -ea- "$1" | exiv2 -ia- "$2"
fi
test -f "$2"
else
# unknown mode of operation, exit with error
echo "Unknown operating mode "$mode" !"
exit 1
fi

Can you try setting verbose=true in the options file and post the error message from the console?

Here is the output of the terminal regarding the conversion to webP:

saving /home/ignace/Images/photos/perso/cameras/X-T4/2022/02/06/convert/DSCF2735.webp with ./magick-io.sh save
  exec error: Failed to execute child process './magick-io.sh' (No such file or directory)

Following the error in the terminal, I looked at the name of my script and it was named imagick-io.sh so it’s normal that it didn’t work. I just renamed it and it works.
Sorry for the inconvenience.
Problem solved.

1 Like