Créer des images WEBP depuis le logiciel ART

Le logiciel ART (another rawtherapee) ne crée pas d’images WEBP par défaut, mais rien n’est perdu, avec un petit script.

Vous devez créer un répertoire .config/ART/imageio/

Dedans, vous créé trois fichiers un exr.txt, un imagick-io.sh (que vous rendez exécutable) et un fichier webp.txt.

Dans le fichier exr.txt, vous mettez le code suivant :

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

Dans le fichier magick-io.sh, vous mettez le code suivant :

#!/bin/bash

mode=$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

Ce code permet de conserver les EXIFs de la photo.

Et dans le fichier webp.txt, vous mettez le code suivant :

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

Voilà, vous pouvez choisir dans ART dans type de format, le WEBP.

gnu_logo.90
ignace72

S’abonner
Notification pour
guest

Ce site utilise Akismet pour réduire les indésirables. En savoir plus sur comment les données de vos commentaires sont utilisées.

0 Commentaires
Commentaires en ligne
Afficher tous les commentaires
Aller au contenu principal