Author Topic: exiftool removes exif data  (Read 2964 times)

acrocephalus

  • Newbie
  • *
  • Posts: 5
exiftool removes exif data
« on: April 09, 2010, 11:31:45 AM »
Hello,
I am using exiftool to introduce the copyright into the exif data using the command
Code: [Select]
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

  • ExifTool Author
  • Administrator
  • ExifTool Freak
  • *****
  • Posts: 14937
    • ExifTool Home Page
Re: exiftool removes exif data
« Reply #1 on: April 09, 2010, 11:42:15 AM »
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, use single quotes (') instead of double quotes (") around arguments containing a dollar sign ($).

acrocephalus

  • Newbie
  • *
  • Posts: 5
[SOLVED]Re: exiftool removes exif data
« Reply #2 on: April 09, 2010, 11:53:59 AM »
Thank you so much, the problem is solved.

Dani

acrocephalus

  • Newbie
  • *
  • Posts: 5
Re: exiftool removes exif data
« Reply #3 on: June 01, 2010, 07:28:17 AM »
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
Code: [Select]
exiftool -Copyright="©Acrocephalus http://www.acrocephalus.net" -ext jpgbut I get this message
Code: [Select]
No file specifiedWhat'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

  • ExifTool Author
  • Administrator
  • ExifTool Freak
  • *****
  • Posts: 14937
    • ExifTool Home Page
Re: exiftool removes exif data
« Reply #4 on: June 01, 2010, 07:29:40 AM »
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, use single quotes (') instead of double quotes (") around arguments containing a dollar sign ($).

acrocephalus

  • Newbie
  • *
  • Posts: 5
Re: exiftool removes exif data
« Reply #5 on: June 01, 2010, 07:34:53 AM »
I have tried
Code: [Select]
exiftool -copyright="©Acrocephalus http://www.acrocephalus.net" -ext jpg "."and I get this error
Code: [Select]
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

  • ExifTool Author
  • Administrator
  • ExifTool Freak
  • *****
  • Posts: 14937
    • ExifTool Home Page
Re: exiftool removes exif data
« Reply #6 on: June 01, 2010, 08:23:24 AM »
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, use single quotes (') instead of double quotes (") around arguments containing a dollar sign ($).