What, if any, are the standard segments of a .JPG file

Started by Gary, November 16, 2015, 11:27:16 PM

Previous topic - Next topic

Gary

Programs often write metadata to the .JPG files directly instead of to an XMP sidecar, as is done for RAW files.
I have a number of legacy .JPG files that I'd like to strip of "extraneous" metadata, if possible, and return them to a pristine state.
I need to do this as I'll be re-ingesting them using Photo Mechanic and want to start with a clean input feed.

I know how to strip items using ExifTool, but not what segments and items should not be touched.
If it is a question of there not really being a standard default content, then I'll take an untouched photo from my Canon EOS 30D and use that as my baseline content.
Just thought I'd ask first.

Hayo Baan

What do you mean with "pristine" state?
Unless the information added is plain wrong, there shouldn't be a need to remove it anyway; PhotoMechanic should be able to cope with it just fine. Plus you could always use PhotoMechanic to strip off obvious garbage too. Just set up a stationary pad where you set the fields you want removed to empty strings. Only if the information is in obscure tags or if the jpgs got corrupted somehow will you really need to use exiftool.

Anyway, if you give us an example of the data that you want removed, we should be able to specify what needs to be done.
Hayo Baan – Photography
Web: www.hayobaan.nl

Phil Harvey

You can use "-exiftool -all=" to remove all metadata from a JPEG image.

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

Gary

Unfortunately, I used to shoot JPG with the EOS 30D and wasn't too careful about backups and embedding metadata in JPG originals.
Now I "have seen the error of my ways" and am cleaning up both my JPG and RAW files.

What I plan to do is try to return the JPG files to their pre-ingested state by:
   - using ExifTool to set the relevant dates to the shot taken date,
   - using ExifTool to write what I can to a standard XMP,
   - using ExifTool to kill off all the metadata and return the JPG to it's as-shot state,
   - backing up the stripped JPG,
   - using Photo Mechanic to adjust the sidecar metadata,
   - using ExifTool to embed the revised sidecar metadata into the stripped JPG,
   - backing up the updated sidecar.

I think I should be able to automate a lot of this.

Hayo Baan

Hi Gary,

Hopefully your other software left the Canon makernotes intact as otherwise you will not really be able to return to a "from camera" state. Note too that if they are jpg, sidecar files are not used and all metadata will be stored inside the jpg (always!).

I'm still not sure if you really need to go this complex route to clean up your files. PM already synchronises the relevant metadata between e.g., IPTC and XMP and you can also use it to clean fields you don't like (just set up a stationary pad with those fields enabled but empty). Dates can be adjusted with PM too, but not as sophisticated as exifTool, of course, so here you may need to go to exiftool.

Again: if they are jpg, metadata is always embedded and there will be no XMP sidecar files. This cuts away most of your steps, I think.

hope this helps,
Hayo
Hayo Baan – Photography
Web: www.hayobaan.nl

Gary

Hayo;

I really just wanted to get a "clean" copy for filing. I now shoot almost totally RAW, so the problem isn't too big.
It appears that any programs used did not remove/change any key data, but I'll check again before potentially wasting time.

Guess I could make a copy of the directory tree and then use ExifTool to remove all but what the original would have had.
ExifTool can do that in one command. I could then use PM to do any needed changes on the pre-stripped copy.
I'll play with this and see if it's worth the trouble.