Removing Date and Time

  • Thread starter Thread starter vance8005
  • Start date Start date
V

vance8005

Hi All,

This question might be a little outside the scope of this group, but I
got some great advice here about a year ago and I'm hoping somebody
can help me now. Anyway, here goes:

How can I remove the date and time from the EXIF file on a digital
image? I have some images that have somehow acquired incorrect dates
and times for when the photo was taken and/or digitized and I want to
blank out the incorrect data. Several software programs will allow me
to change the dates and times, but I want to eliminate those data
fields completely and leave them blank. I don't know the actual
dates and times, so I'd rather have no data than incorrect data.
Just a plain ol' blank is what I want.

Many thanks,
Dave
 
Hi All,

This question might be a little outside the scope of this group, but I
got some great advice here about a year ago and I'm hoping somebody
can help me now. Anyway, here goes:

How can I remove the date and time from the EXIF file on a digital
image? I have some images that have somehow acquired incorrect dates
and times for when the photo was taken and/or digitized and I want to
blank out the incorrect data. Several software programs will allow me
to change the dates and times, but I want to eliminate those data
fields completely and leave them blank. I don't know the actual
dates and times, so I'd rather have no data than incorrect data.
Just a plain ol' blank is what I want.

Many thanks,
Dave
There are several Utilities that can edit EXIF information. Not all of them
can edit the date and time.

EXIFER (free)
http://www.snapfiles.com/get/Exifer.html

RoboPhoto 3.1 ($35 Single User Personal License)
http://www.robophoto.com/exif.html

Everybody has their favorite.
Google for "EXIF editor" without the quotes.
 
Thanks, Carl. I downloaded Exifer and it will do exactly what I asked
for - remove the incorrect dates and times from the EXIF file. But
now I want to go one step farther and insert what I believe are correct
dates in a different format than the EXIF file normally contains. For
example, instead of "7/23/1995 2:34:45PM," I want to have just
"1995" or "July 1995" or "7/1995" or something like that.
To that end, I've learned how to extract the EXIF data to an XML file
and re-insert it after editing, but I don't know the XML language and
my attempts to edit the data in the XML file have failed. Does anybody
know of a program that will do that for me or can you point me to an
XML guru who can show me how? I'm guessing this is something a lot
of digital photographers and scanners would like to know how to do.

Thanks again,
Dave
 
I downloaded Exifer and it will do exactly what I asked for - remove
the incorrect dates and times from the EXIF file. But now I want to
go one step farther and insert what I believe are correct dates in a
different format than the EXIF file normally contains.
To that end, I've learned how to extract the EXIF data to an XML file
and re-insert it after editing, but I don't know the XML language and
my attempts to edit the data in the XML file have failed.

? Google://"xml tutorial" may help. XML is a file format that's fairly
easy for computers to parse, since there are a bunch of rules about
what's acceptable and what isn't, and all fields are explicitly
delimited. It isn't usually meant to be human-editable, though it
should show up fine in a text editor (note: Microsoft Word is *not* a
text editor) and you can edit it there. Real Editors like emacs and vim
and nedit also have syntax highlighting, which can make editing text
easier in some cases.
Does anybody know of a program that will do that for me or can you
point me to an XML guru who can show me how?

You might try putting the source XML file on your webspace and posting a
URL to where you put that file in a followup. If you don't *have*
webspace, mail the file to me (mind the SPAN TRAP) and I'll put it up on
mine. Finding the DTD[0] or schema[1] that the file should follow will
also help. Also, describe what it is that you'd like to do to the
date(s) in the file, and people will offer suggestions. HTH,


[0] Document Type Definition, another document that tells an XML parser
what tags it should expect in what order in an XML file. This also
contains information about what a tag can contain.

[1] Like a DTD, but with extra buzzwordy goodness and a few additional
features.
 
Hi Matt,

Thanks! I just created an XML file containing the EXIF data from a
sample photograph and I'll email it to you.

I downloaded Microsoft XML Notepad and several other free XML editors,
so I've been able to look inside the XML file and find the data I
want to change. But when I type in data in a different format and
import the XML file back into the EXIF file, the EXIF readers just show
blanks instead of what I've typed, so I must have the format wrong or
something. The last language I learned was Fortran IV and I'm sure
things have changed a bit in the last 30 years. I'll bet you don't
even have to type your lines of code onto punch cards and feed them
into the mainframe anymore. (grin)

Thanks again,
Dave
 
just created an XML file containing the EXIF data from a sample
photograph and I'll email it to you.

One of the relevant tags looks like:

<property Tag="36867">
<name>Date Time Original</name>
<length>20</length>
<type>2</type>
<Value>2005:06:30 18:05:00</Value>
But when I type in data in a different format and import the XML file
back into the EXIF file, the EXIF readers just show blanks instead of
what I've typed, so I must have the format wrong or something.

A tag of type 2 is ASCII, according to the stuff in
/usr/include/libexif/ on my system. That makes things easier. The
string "2005:06:30 18:05:00" is 19 characters plus the trailing NUL,
which is 20. If you changed that string to "Heck if I know", then you'd
need to change the length to 15.

Of course, the program you're using may enforce its own restrictions on
what's acceptable within a "Date Time.*" tag. It wouldn't surprise me
if it made sure the <Value> for that tag matched NNNN:NN:NN NN:NN:NN ,
where N is any number from 0-9. I went into one of my photos with a hex
editor and changed the date from "2001:03:04 12:34:56" to "CRUD:ZZ:ZZ
AB:CD:FG" , and ImageMagick picked up the right data when I ran identify
-verbose on it. Konqueror didn't display the date info when I hovered
over the image, but it found letters where it expected numbers, so that
probably caused its date parsing code to barf.
last language I learned was Fortran IV and I'm sure things have
changed a bit in the last 30 years.

XML is not a computer language. It's a data format. And you can still
write FORTRAN, but hardly anyone does. You can do much more damage in a
far shorter timeframe with Perl, and you can make Perl as unreadable as
FORTRAN with a bit of effort :-) .

But... my fiddling with Konqueror leads me to believe that if you try
to put anything into the "date" EXIF tags that doesn't match YYYY:MM:DD
HH:MM:SS , other programs that parse EXIF data will get annoyed and may
refuse to display things. So, use your best guess as to when the photos
were taken, or just use "01" as shorthand for "I don't know for sure" on
the date fields where you're not sure.
 
Outstanding! Thanks, Matt.

I figured <length> was the number of characters too and tried changing
it when I changed the data in <value> and had the same result. I think
you're absolutely right when you say the program reading the EXIF
file expects data in a certain format and refuses to display anything
else. I'll have to come up with a code for myself as you suggested.

Thanks again and take care,
Dave
 
Back
Top