Transfer all tags except ICC profile

Started by boxerab, February 06, 2023, 02:03:41 PM

Previous topic - Next topic

boxerab

Hello!
Thanks again for this wonderful software.

I currently run exiftool from Perl module with command

$exifTool->SetNewValuesFromFile($srcFile, 'all:all');

when creating a JPEG 2000 image from TIFF.  I transfer all tags.

In some cases, I apply the ICC profile to the output image, so in this case I don't want
to transfer the ICC profile, as it has already been applied. How can I exclude just the ICC,
and transfer everything else ?

Note, there may or may not be an ICC profile in the original TIFF.

EDIT: just realized this post should be in the Image::Exiftool part of the forum....

Thanks,
Aaron

Phil Harvey

Hi Aaron,

ICC_Profile is an "unsafe" tag, so it isn't copied with -all:all.

- Phil
...where DIR is the name of a directory/folder containing the images.  On Mac/Linux/PowerShell, use single quotes (') instead of double quotes (") around arguments containing a dollar sign ($).

boxerab

Hi Phil,
Thanks, that is in fact perfect for me, as I am always able to transfer ICC profile myself.
What does "unsafe" mean exactly ?
Aaron

StarGeek

Quote from: boxerab on February 06, 2023, 04:54:18 PMWhat does "unsafe" mean exactly ?

From the Tag Names page (emphasis mine)
    An exclamation point (!) indicates a tag that is considered Unsafe to write under normal circumstances. These tags are not written unless specified explicitly (ie. not when wildcards or "all" are used), and care should be taken when editing them manually since they may affect the way an image is rendered.

They're often tags which will change the colors of an image such as the ICC_Profile.
"It didn't work" isn't helpful. What was the exact command used and the output.
Read FAQ #3 and use that cmd
Please use the Code button for exiftool output

Please include your OS/Exiftool version/filetype

boxerab


Phil Harvey

(I love it that I know at least one person reads the documentation.  I think StarGeek probably knows it better than I do.)

- Phil
...where DIR is the name of a directory/folder containing the images.  On Mac/Linux/PowerShell, use single quotes (') instead of double quotes (") around arguments containing a dollar sign ($).