ExifTool Forum

ExifTool => The "exiftool" Application => Topic started by: boxerab on February 06, 2023, 02:03:41 PM

Title: Transfer all tags except ICC profile
Post by: boxerab on February 06, 2023, 02:03:41 PM
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
Title: Re: Transfer all tags except ICC profile
Post by: Phil Harvey on February 06, 2023, 03:53:01 PM
Hi Aaron,

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

- Phil
Title: Re: Transfer all tags except ICC profile
Post by: boxerab on February 06, 2023, 04:54:18 PM
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
Title: Re: Transfer all tags except ICC profile
Post by: StarGeek on February 06, 2023, 07:15:00 PM
Quote from: boxerab on February 06, 2023, 04:54:18 PMWhat does "unsafe" mean exactly ?

From the Tag Names page (https://exiftool.org/TagNames/) (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.
Title: Re: Transfer all tags except ICC profile
Post by: boxerab on February 06, 2023, 08:06:55 PM
excellent, thanks!
Title: Re: Transfer all tags except ICC profile
Post by: Phil Harvey on February 06, 2023, 08:52:06 PM
(I love it that I know at least one person reads the documentation.  I think StarGeek probably knows it better than I do.)

- Phil