I am using exifTool, and I find this a great work. I really mean it.
I have the following problem, but probably I am doing something wrong.
I have some jpg files with "Adobe RGB 1988 profile".
I can see this if I open the file in Photoshop, since it tells me that the profile of the file is different from the user profile(probably the translation is not correct, hope is clear what it means).
Then I do the following: exiftool.exe -TagsFromFile a.jpg b.jpg
The result file doesn't look to have "Adobe RGB 1988 profile" if I open it with Photoshop .
Right. This tag is considered unsafe to copy since it affects the image, so it must be specified explicitly on the command line:
exiftool -tagsfromfile a.jpg -all:all -interopindex b.jpg
or use -unsafe to also copy the other common "unsafe" jpeg tags:
exiftool -tagsfromfile a.jpg -all:all -unsafe b.jpg
See the Shortcuts tags (https://exiftool.org/TagNames/Shortcuts.html) documentation for more information.
- Phil
Hello Phil, thanks for your reply.
I did as you suggested ("exiftool -tagsfromfile a.jpg -all:all -unsafe b.jpg"),
but the result file still doesn't recognize it as AdobeRGB.
I am not able to attach the file I'm using for test, it says for security reasons.
Thanks,
LeoBen
I suggest comparing the metadata of the two files to see what is different:
exiftool -a -G1 a.jpg > a.txt
exiftool -a -G1 b.jpg > t.txt
diff a.txt b.txt
- Phil
I compared the metadata of the two files.
There are many differences, but I noticed in particolare that the section [ICC-header] from the first file,
is completely missing in the second one.
OK then, you should also copy the ICC_Profile:
exiftool -tagsfromfile a.jpg -all:all -interopindex -icc_profile b.jpg
- Phil
It works!
You really helped me a lot.
Just one last question:
I need to perform this operation in Java.
Do you suggest to invoke the exe from java? How does it works for MAC?
I haven't tried to do this from Java myself, but here are a few Java wrappers available from the ExifTool home page that may help. I would imagine that they all just exec exiftool as you mentioned.
- Phil
Hello Phil,
I'm using exiftool from Java by doing exec in Windows environment.
I didn't need any installation. So I just invoke the exe with the proper file path.
I would need to do that also in MAC environment.
How can I do that?
Thanking you in advance,
Leo
Hi Leo,
You should be able to do it the same way on a Mac.
- Phil
Hi Phil,
for Windows there is an exe file (and I need only that file).
What I need for MAC? all the folder bin (contained in the .dmg file) included teh subfolders named "File" and "Image"?
I really appreciate your help.
See the ExifTool install instructions (https://exiftool.org/install.html) for details about the installation. Everything you need is included. On Mac, "exiftool" is an executable Perl script, and "lib" contains the necessary libraries.
- Phil