Page 1 of 1

Preserve creation date on a file conversion

Posted: 2009-01-12T00:39:28-07:00
by mdelatorre
I am doing some georeferencing pf pictures taken with a GPS track log. The date and time is used for this purpose. How can I manipulate images with Imagemagick without loosing the creation date and time of the image file?

Manuel.

Re: Preserve creation date on a file conversion

Posted: 2009-01-12T22:31:32-07:00
by anthony
Generally that is OS and file system dependant. Typically you create the new file then transfer the time from the old to the new file.

Under UNIX you can do this with the 'touch' command (-r option) But I have no idea how it is done under windows.

generally it isn't important as the change or modified time is important. A Creation time if important is more typically stored in meta-data rather than file time stamp. Changing file times can stuff up archive and backup handling as that is often the how they know a file has changed.

Re: Preserve creation date on a file conversion

Posted: 2009-01-14T12:51:15-07:00
by mdelatorre
Anthony,

Thank you for your answer. I am using Linux (Ubuntu 8.10). I understand that generally it is not important to keep the date of the file and this info is stored as a exif metadata on the picture. But on this particular case date on the file is important because the georeferencing tool I am using (JOSM) needs this info so it can reference the pictures with the GPS track log.

Is it possible to use the date and time exif metadata to rewrite the date and time of the physical file?

Manuel.

Re: Preserve creation date on a file conversion

Posted: 2009-01-15T20:47:10-07:00
by anthony
I can understand this. I have update files for Make Building where the file has not actually changed, but the change in time stamp causes a large built to redo a huge number of unneeded steps.

touch can set the modify timestamp of the disk file, from either a given reference file, or from a user provided time stamp string.

Re: Preserve creation date on a file conversion

Posted: 2010-11-19T08:07:01-07:00
by tg3793
Doesn't apear to be possible with ImageMagick (hope that it's added one day). However I'm working on a script at the moment that will put the "modified date" back after doing a rotation. You can check out the work I'm doing here (and the questions I have) --> http://ubuntuforums.org/showthread.php?p=10135632

In short I'm using jhead to get return the modification data back to where it was. You can check the options for that tool on their website to see if it will do exactly what you are asking. If not then I wouldn't mind hunting around a little bit for you to see if I can find something.