Preserve creation date on a file conversion

Questions and postings pertaining to the usage of ImageMagick regardless of the interface. This includes the command-line utilities, as well as the C and C++ APIs. Usage questions are like "How do I use ImageMagick to create drop shadows?".
Post Reply
mdelatorre

Preserve creation date on a file conversion

Post 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.
User avatar
anthony
Posts: 8883
Joined: 2004-05-31T19:27:03-07:00
Authentication code: 8675308
Location: Brisbane, Australia

Re: Preserve creation date on a file conversion

Post 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.
Anthony Thyssen -- Webmaster for ImageMagick Example Pages
https://imagemagick.org/Usage/
mdelatorre

Re: Preserve creation date on a file conversion

Post 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.
User avatar
anthony
Posts: 8883
Joined: 2004-05-31T19:27:03-07:00
Authentication code: 8675308
Location: Brisbane, Australia

Re: Preserve creation date on a file conversion

Post 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.
Anthony Thyssen -- Webmaster for ImageMagick Example Pages
https://imagemagick.org/Usage/
tg3793
Posts: 6
Joined: 2010-11-19T08:00:56-07:00
Authentication code: 8675308

Re: Preserve creation date on a file conversion

Post 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.
Post Reply