tu ne peux pas faire ça simplement avec Purebasic
tu as un outil très sympa et très puissant en ligne de commande qui s'appelle Exiftool
https://www.sno.phy.queensu.ca/~phil/exiftool/j'ai écrit un Module pour Purebasic qui permet de l'utiliser simplement
viewtopic.php?f=6&t=17554Pour effacer toutes les métadonnées ...
En ligne de Commande
Code:
exiftool -all= mon fichier.jpg
Avec mon module
Code:
FileName="C:\Monimage.jpg"
Exiftool::Command("-all=")
;TODO This Toow Line are very Important to Support Path With Special Character Or You Will Have "File Not Found" Error.
Exiftool::Command("-charset")
Exiftool::Command("FILENAME=utf8")
Exiftool::Command(FileName.s)
Ei.i=Exiftool::Execute()
If Exiftool::WaitExecute(Ei,-1)=#True
If Exiftool::GetResultStdErr(Ei)<>""
Debug "You Have an Error:"+Exiftool::GetResultStdErr(Ei)
Else
Debug Exiftool::GetResultStdOut(Ei)
Endif
Endif
Exiftool::FreeResult(Ei) ;TODO After take data clean used memory
pour retirer les tafs photoshop et garder les autres Iptc
Code:
exiftool -photoshop:all= -tagsfromfile @ -iptc:all monfichier.jpg
avec mon module et en purebasic
Code:
FileName="C:\Monimage.jpg"
Exiftool::Command("-photoshop:all=")
Exiftool::Command("-tagsfromfile @")
Exiftool::Command("-iptc:all")
;TODO This Toow Line are very Important to Support Path With Special Character Or You Will Have "File Not Found" Error.
Exiftool::Command("-charset")
Exiftool::Command("FILENAME=utf8")
Exiftool::Command(FileName.s)
Ei.i=Exiftool::Execute()
If Exiftool::WaitExecute(Ei,-1)=#True
If Exiftool::GetResultStdErr(Ei)<>""
Debug "You Have an Error:"+Exiftool::GetResultStdErr(Ei)
Else
Debug Exiftool::GetResultStdOut(Ei)
Endif
Endif
Exiftool::FreeResult(Ei) ;TODO After take data clean used memory
J'ai tapé les codes sans pouvoir les vérifier... mais dans le principe c'est ça !