Bonsoir à tous.
J’essaye d’exporter mes photos en WebP et j’ai une erreur d’enregistrement.
J’ai utilisé le tuto suivant : https://bitbucket.org/agriggio/art/wiki/Customformats
J’ai créé un fichier webp.txt avec dedans le code suivant :
[ART ImageIO]
# the file extension of the type handled
Extension=webp
# communicate via 16-bit PNG files
Format=png16
# the command for loading
ReadCommand=./webp-io.sh load
# the command for saving
WriteCommand=./save-webp-io.sh save
# the label for the GUI
Label=WebP (via libwebp)
Puis, j’ai créé un script shell save-webp-io.sh
avec le code suivant :
#!/bin/sh
mode=$1
shift
if [ "$mode" = "save" ]; then
# saving: convert from 16-bit png to the output
cwebp -q 80 "$2" -o "$1"
if [ -f "$2" ]; then
# copy also the metadata with exiftool
exiftool -tagsFromFile "$1" -overwrite_original "$2"
fi
test -f "$2"
else
# unknown operating mode, exit with error
echo "Unknown operating mode \"$mode\"!"
exit 1
fi
Voilà. la commande pour convertir une image en WebP est la suivante :
cwebp -q 80 exemple.png -o exemple.webp
Quelqu’un peut-il me dire ce qu’il ne va pas avec mon script ?
Merci.
Ignace.