News:

2023-03-15 Major improvements to the new Geolocation feature

Main Menu

exiftool removes exif data

Started by acrocephalus, April 09, 2010, 11:31:45 AM

Previous topic - Next topic

acrocephalus

Hello,
I am using exiftool to introduce the copyright into the exif data using the command
for i in $( ls *.jpg);
do exiftool -Copyright="©Acrocephalus http://www.acrocephalus.net" *.jpg;
done

The problem is that removes some exif data, such as the date and time when the picture was take. How can I solve it?
Best,

Dani

Phil Harvey

Hi Dani,

First, your loop causes each file to be rewritten for each JPG in the directory.  (So if there are 3 images in the directory, exiftool will rewrite each image 3 times for a total of 9 processing passes.)  I'm sure this isn't what you want.  You should just remove the for loop.  In fact, you should also remove the "*.jpg" and replace it with "-ext jpg .".

Now to address your concern:  The command you gave should only change the filesystem date/times for the images (they will be changed to the current time).  No EXIF dates should be changed.  You can do "exiftool -a -exif:time:all" to see all of the EXIF date/time tags.  Do this before and after writing the copyright tag and you should find the output is the same.

If the problem is that you don't want the filesystem date/time values to change you can use the -P option to preserve the FileModifyDate.

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

acrocephalus

Thank you so much, the problem is solved.

Dani

acrocephalus

Hello,
I have realized that something is not working. When I want to add the copyright to a directory full of jpeg images I run
exiftool -Copyright="©Acrocephalus http://www.acrocephalus.net" -ext jpg
but I get this message
No file specified
What's the problem? I would like to add the copyright to all the jpeg images in a given directory. How can I do it?
Thanks!

Dani

Phil Harvey

Hi Dani,

You need to put the directory name on the command line.  Use "." for the current directory, or something like "C:\path\to\images" for other directories.

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

acrocephalus

I have tried
exiftool -copyright="©Acrocephalus http://www.acrocephalus.net" -ext jpg "."
and I get this error
Warning: [minor] Entries in IFD0 were out of sequence. Fixed. - ./ACR_1766.jpg
Error: Bad format (0) for IFD0 entry 0 - ./ACR_1766.jpg

where ACR_1766.jpg is the name of a picture. I get this error for every picture in the folder.
Thanks,

Dani

Phil Harvey

Hi Dani,

Looks like the EXIF information could be corrupted in your images.  See the FAQ about repairing corrupted EXIF.  And if you post a sample here I will take a look to see what the damage is.

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