ExifTool Forum

ExifTool => The "exiftool" Application => Topic started by: papman on October 09, 2018, 02:02:12 PM

Title: Need to strip some tags for compatibility with minilab machine
Post by: papman on October 09, 2018, 02:02:12 PM
We have a minilab machine and we print jpgs from various professional photographers. Every now and then we come across a jpeg that the minilab messes up slightly it's colors. I know the first though that comes to mind is the color profile, but it's not this. Profiles are always sRGB and have double checked this.

[Edit: This started as a question, but I figured out my problem, so now I'm just posting my solution in case someone else needs this]

When this happens, the only way to fix the problem is to do this in windows explorer: To click the "Remove Properties and Personal Information" and then choose "Remove All".

(https://image.ibb.co/iKrag9/2018_10_09_20_31_53_Total_Commander_x64_9_21a_NOT_REGISTERED.jpg)

This creates a copy that is printed correctly!! I repeat again in both cases the profile is sRGB so this was not the problem. The problem is that the minilab is finding some camera information and is trying to apply corrections based on the model, but we don't want this and our technician can't seem to figure out how to remove this feature.

So I'm trying to emulate the way "Remove Properties and Personal Information" works with exiftool. The first thing I did is to check what exactly this strips from the exif. These are the differences in a Compare application.

(https://image.ibb.co/kjbmop/2018_10_09_20_35_54_Compare_contents.jpg)

The left side is the Original problematic file, and the right the changes that windows 10 make when you click "Remove Properties and Personal Information"  from file properties. This is the full list of changes (the lines that are equal are collapsed).

I emulated this behaviour in exiftool like this:

exiftool -CircleOfConfusion= -CreateDate= -CreatorTool= -DateTimeCreated= -DateTimeOriginal= -ExposureProgram= -FOV= -Flash= -FocalLength35efl= -HyperfocalDistance= -ISO= -LightValue= -Make= -MeteringMode= -Model= -ScaleFactor35efl= -Software= -TimeCreated= -WhiteBalance= -FlashFired= -FlashFunction= -FlashMode= -FlashRedEyeMode= -FlashReturn=

This makes these changes:

(https://image.ibb.co/c0Her9/2018_10_09_22_11_34_Compare_contents.jpg)

Looks good! I will try it out tomorrow in production. Notice that I added the -Flash* tags. I don't know why but exiftool seems to be adding these without any reason! Is this a bug in 11.11?
Title: Re: Need to strip some tags for compatibility with minilab machine
Post by: StarGeek on October 09, 2018, 05:22:10 PM
First, I'd suggest looking at the tag list with duplicates and groups enabled with exiftool -G1 -a -s.  Any tag in the Composite group can be safely ignored, as those tags aren't actually embedded in the file, they are informative tags derived from other tags in the file (see Composite Tags (https://exiftool.org/TagNames/Composite.html)).  CircleOfConfusion is an example of this.  You can't delete it directly, but it will not appear if one of the tags it is based upon is removed.

Regarding the previous command you used before editing, you can keep the color space info when you use -all= by adding it back in with -TagsFromFile @ -ColorSpaceTags (see Shortcut Tags (https://exiftool.org/TagNames/Shortcuts.html) for info on what tags are included with ColorSpaceTags).

You can also bulk remove tags with an asterisk.  For example, if you want to remove all the tags with Flash in the name, you can use -*Flash*=

If you think Minilab is trying to add corrections based upon the camera, you probably can just use -Make= -Model= -Makernotes=.  That should delete any data that could identify the camera model.