delete all except colorprofile

Started by myth5656, September 17, 2010, 12:49:55 PM

Previous topic - Next topic

myth5656

Hello guys,

When using -all= option all data will be deleted, also the colorprofile. Is there a way to exclude the profile? (i mean the pfofile like Adobe sRGB). I want to avoid that an extra file need to be written, where the information is stored...

I tried to use --icc_profile:all, but there are is also some information stored which is broken, so I want to remove it, that PhotoShop does not complain about broken data when opening the image.

Cheers.

Phil Harvey

I'm not sure what you want.  I would have suggested -all= --icc_profile:all, but you said: "there are is also some information stored which should be removed" -- what exactly do you mean by that?  Also, what file type are we dealing with here?  JPEG?

- 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 ($).

myth5656

Sorry I updated my post. It is an jpeg, and when opening the original  image with PhotoShop it sais that some data is broken. I used --icc_profile:all and still get the message. So I want to try to remove all except the color profile. 

Thank for the fast reply.

Phil Harvey

#3
Generally, the technique to fix format errors is to rebuild the metadata (a la FAQ number 20).  This means deleting it all then copying some back again (as opposed to deleting all but some metadata as with my previous command).

The following command will do this:

exiftool -all= -tagsfromfile @ -icc_profile FILE

This should work for JPEG images.

- 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 ($).

Phil Harvey

But thinking about this a bit more, both commands should have the same effect since the ICC profile is stored in a separate JPEG segment (and both commands should remove all other segments).  So perhaps the metadata problem is in the ICC profile itself.  If this is the case, I can not help.  Does photoshop complain if you just do -icc_profile=?

- 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 ($).

myth5656

Quote from: Phil Harvey on September 17, 2010, 01:33:26 PM
So perhaps the metadata problem is in the ICC profile itself.  If this is the case, I can not help.  Does photoshop complain if you just do -icc_profile=?
I checked it again, and you are right. The metadata itself was the problem. thanks for you help!

best wishes,
myth5656