Option to preserve modification time
Swiss army knife of image processing
Brought to you by:
bfriesen
It would be nice if GM included an option that would preserve modification times, just like for example jpegoptim includes.
From: http://www.kokkonen.net/tjko/src/man/jpegoptim.txt
-p, --preserve
Preserve file modification times.
This would be useful in many mass-manipulation scenarios and users could avoid making their own hacky ctime/mtime scripts (e.g. http://ubuntuforums.org/showthread.php?t=1505788).
It would also be nice if GM preserved file ownership and other file attributes instead of always re-creating the file.
Preserving the timestamp in a file that is changed is an untruth.
Some time ago I caved in and put these options in pngcrush:
-newtimestamp (Reset file modification time [default])
-oldtimestamp (Do not reset file modification time)
But then there's the question, "How can these two files have the same name and modification time, but different filesizes?"
Patch to implement this request is now here: https://sourceforge.net/p/graphicsmagick/patches/45/
Thanks Niko!
As of today, this is now supported in 'mogrify' via a -preserve-timestamp option.