Hi,
I'm trying to run a command line to copy all metas & icc_profile from file1 to file2,
and inserting a default *.icc if file1 doesn't have one.
So far, this is what I've got:
exiftool -overwrite_original -TagsFromFile file1 -all:all "-icc_profile-<= -icc_profile<=sRGB_IEC61966-2-1.icc" file2
But this isn't working.
Would you have an idea ?
Thanks.
This should do what you want:
exiftool "-icc_profile<=sRGB_IEC61966-2-1.icc" -tagsfromfile file1 -all:all -icc_profile file2
Since ICC_Profile is protected, you must specify it explicitly when copying. If it exists in file1, then it will override the earlier assignment.
- Phil
Thanks for your help, it works great.
And just out of curiosity, how would do with a single file, to add a default profile if none exists, I tried :
exiftool "-icc_profile<=sRGB_IEC61966-2-1.icc" -if "not $profiledescription" file
or like the previous one with tagsfromfile, but within the same file
exiftool "-icc_profile<=sRGB_IEC61966-2-1.icc" -tagsfromfile file -all:all -icc_profile file
With no success.
Your first command should work (if you are on Windows, because the quoting would be wrong for Mac/Linux), however I would suggest testing $ICC_Profile:all instead of $profileDescription just in case the description is empty.
- Phil
Thanks, my bad, the first command is indeed working, I was checking results on a different file.