Problèmes et questions sur les applications multimédia.
#1Messageil y a 2 ansBonjour à tous.
Je viens vers vous car je n’ai pas exif sur mes photos en WEBP.
Avec le logiciel ART, j’utilise un script qui utilise exiftool mais il n’enregistre pas les exif, j’ai essayé aussi de copier les exif depuis un fichier JPG mais ça n’enregistre rien non plus.
Voilà le script que j’utilise avec ART :
#!/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 -define quantum:format=floating-point -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 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
Merci. PC de bureau.
AMD Ryzen 3 1200 Quad-Core, 32 Go de Ram DDR4, AMD FirePro W5000.
Manjaro stable, Xfce.
#2Messageil y a 2 ansbonjour
voir le man est clair dans son tableau
WEBP r
donc exiftool ne peut que lire pour ce format
--------------
Par contre, tu peux ré-écrire le script avec un autre outil qui lui donne:
WEBP Read/Write
Manjaro STABLE - Linux lts - fish - Kde5 - icore N100 - 16Go RAM - ssd - efi
#mount /dev/archlinux /mnt/manjaro
#3Messageil y a 2 ansBonsoir, papajoke.
J’ai trouvé ça : https://dev.exiv2.org/boards/3/topics/3186
La solution donnée est la suivante :
exiv2 -ea- foo.jpg | exiv2 -ia- man.png
Quand je l’adapte à mon script comme suit :
exiv2 -ea- "$1" | exiv2 -ia- "$2"
Ça ne donne rien plus d’exifs. Ou es-je fais une erreur ?
Quand je fais pour tester :
exiv2 -ea- CW6A0393.CR2 | exiv2 -ia- convert/CW6A0393.webp
Je n’ai pas non plus les exifs.
J’ai l’erreur suivante :
/usr/include/c++/11.1.0/backward/auto_ptr.h:198: std::auto_ptr< <template-parameter-1-1> >::element_type* std::auto_ptr< <template-parameter-1-1> >::operator->() const [with _Tp = Exiv2::Image; std::auto_ptr< <template-parameter-1-1> >::element_type = Exiv2::Image]: Assertion '_M_ptr != 0' failed.
Abandon (core dumped)
Merci. PC de bureau.
AMD Ryzen 3 1200 Quad-Core, 32 Go de Ram DDR4, AMD FirePro W5000.
Manjaro stable, Xfce.
#4Messageil y a 2 ansje viens de faire un petit test d'écriture : copier toutes clés et editer la clé exif "user-comment" et cela passe
peut être que "magick convert" retourne un mauvais format .webp ?
convertir test.jpg en test.webp et retourne exif
#!/usr/bin/bash
img=${1:-'test'}
cwebp -q 60 "$img.jpg" -o "$img.webp"
exiv2 -ea- "$img.jpg" | exiv2 -ia- "$img.webp"
exiv2 -M'set Exif.Photo.UserComment charset=Ascii Ma photo' "$img.webp" ||exit 4 # erreur écriture ?
webpinfo "$img.webp"
exiftool -list -EXIF:All "$img.webp"
exiftool "webp" retourne bien l'exif jpg et mon "user comment":
File Name : test.webp
File Size : 282 KiB
File Permissions : -rw-r--r--
File Type : WEBP
File Type Extension : webp
MIME Type : image/webp
VP8 Version : 0 (bicubic reconstruction, normal loop)
Exif Byte Order : Little-endian (Intel, II)
Camera Model Name : ZTE-SKATE
Exif Version : 0220
Date/Time Original : 2013:05:04 16:21:43
Create Date : 2013:05:04 16:21:43
Focal Length : 4.3 mm
User Comment : Ma photo
Compression : JPEG (old-style)
Thumbnail Offset : 239002
Thumbnail Length : 49326
Thumbnail Image : (Binary data 49326 bytes, use -b option to extract)
Image Size : 2560x1920
...
Compression : JPEG (old-style)
je suppose qu'il faut le ré-écrire car + jpeg Manjaro STABLE - Linux lts - fish - Kde5 - icore N100 - 16Go RAM - ssd - efi
#mount /dev/archlinux /mnt/manjaro
#5Messageil y a 2 ansBonjour, papajoke.
Je viens de tester avec les commandes du script que tu m’a donné et c’est bon, ça marche avec un jpg.
Je viens de tester avec un tiff et ça me met une erreur :
cwebp -q 90 "CW6A0393.tiff" -o "CW6A0393.webp"
TIFFFetchNormalTag: Warning, Incorrect value for "RichTIFFIPTC"; tag ignored.
Memory: Sorry, can not handle images with IEEE floating-point samples.
Error! Could not process file CW6A0393.tiff
Error! Cannot read input picture file 'CW6A0393.tiff'
Voilà mon image tiff créé avec le logiciel ART : https://ignace72.eu/wp-content/uploads/ ... A0393.tiff
Merci. PC de bureau.
AMD Ryzen 3 1200 Quad-Core, 32 Go de Ram DDR4, AMD FirePro W5000.
Manjaro stable, Xfce.
#6Messageil y a 2 ansBon, j’ai enlevé la partie en virgule flotante de la commande suivante :
magick convert "$1" $sz -colorspace sRGB -depth 32 -compress none "$2"
Et là, ça fonctionne le webp à retrouvé ses exifs.
Mon script pour la conversion en webp dans le logiciel ART est celui-là :
#!/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
Merci à toi pour ton aide précieuse, papajoke. PC de bureau.
AMD Ryzen 3 1200 Quad-Core, 32 Go de Ram DDR4, AMD FirePro W5000.
Manjaro stable, Xfce.