Removing all EXIF then writing some back

Started by dgordon, March 15, 2011, 02:16:59 PM

Previous topic - Next topic

dgordon

I once had a nice little AppleScript which would remove all the EXIF metadata from a JPEG then, for a bit of fun, add some spurious data back. Naturally now that I need it I can't find it...

So from a Mac Terminal I can successfully remove all the EXIF using "-EXIF=". Or I can change the make of camera used with "-EXIF:make=Apple". What I haven't worked out is how to do both! Remove all the EXIF and write back some tags such as make and model (for example).

Any pointers? I really can't remember how I did it before!

Thanks!

Phil Harvey

Try this:

exiftool -exif:all= -exif:make="Apple" ...

What you were doing was erasing EXIF as a block, which is different than erasing the EXIF tags individually by specifying the group.  When you write as a block you can't change the individual tag values inside the block.

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

dgordon

Many thanks Phil, I was wondering if I was wiping everything and would then have to recreate the EXIF I wanted. Anyway, that works.

You used quotes in your example

-exif:make="Apple"

but I found it worked without

-exif:make=Apple

Should I use "quotes" or is personal preference?

Thanks!

Phil Harvey

You only need quotes if the value contains special characters such as spaces.  I often add them even if it isn't necessary just to avoid questions about why something like this doesn't work: -exif:make=Apple Inc.

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