1

Edit 26/04/2016 : This is a bug that has been fixed in ImageMagick-6.9.3-5 and 7.0.0-0

.

Converting DNG files, when I run

convert "my_img.dng" "my_img_converted.jpg"

Imagemagick changes the date modified of the original my_img.dng to the time when conversion happened.

.

Do you know how to avoid that and keep the original file intact?

Voy
  • 5,286
  • 1
  • 49
  • 59

1 Answers1

1

I would say that is a bug! A workaround is as follows:

convert dng:- result.jpg < original.dng

Or, equivalently if you prefer reading left-to-right and don't mind superfluous processes:

cat original.dng | convert dng:- result.jpg
Mark Setchell
  • 191,897
  • 31
  • 273
  • 432
  • @GlennRanders-Pehrson I tried running `ufraw` myself outside of ImageMagick and that didn't change the date on the DNG, so I wasn't sure who was to blame. Do you have an account on IM forum - I don't myself - if so, maybe you would care to bring it to their attention. Or maybe I should join up... – Mark Setchell Feb 12 '16 at 17:03
  • I do, but thought I'd investigate first. We'd be glad to have you on the IM forums; go to http://www.imagemagick.org/discourse-server to join or to lurk as a guest. – Glenn Randers-Pehrson Feb 12 '16 at 17:08
  • 1
    Verified the bahavior described by OP and by @MarkSetchell: "convert in.dng out.png" changes the timestamp of "in.dng". But "ufraw-batch --silent --create-id=also --out-type=png --out-depth=16 --output=out.png in.dng", which is the "delegate" command used by ImageMagick, does not. This test with ImageMagick-7.0.0, current version, and ufraw-batch version 0.22. – Glenn Randers-Pehrson Feb 12 '16 at 21:12
  • 2
    Bug reported upstream: http://www.imagemagick.org/discourse-server/viewtopic.php?f=3&t=29141 – Glenn Randers-Pehrson Feb 12 '16 at 21:26
  • 2
    This bug has been fixed in ImageMagick-6.9.3-5 and 7.0.0-0 – Glenn Randers-Pehrson Feb 21 '16 at 05:35
  • Thank you, @GlennRanders-Pehrson for getting this sorted out. – Mark Setchell Feb 25 '16 at 09:02
  • @GlennRanders-Pehrson and Mark Setchell - Thanks for reporting and sorting this out guys. This has also been happening with cr2's and nef file formats. Do you know if it has been fixed for these too? – Voy Apr 06 '16 at 08:56
  • @Voy I haven't tested NEF or CR2, but since they both are handled with the DNG+ufraw-batch codec in ImageMagick, I expect that those are also fixed. – Glenn Randers-Pehrson Apr 06 '16 at 13:31
  • @GlennRanders-Pehrson Right, I thought so too. I'll try to get back once I test that fix on nef and cr2's. Once again, thanks for help! – Voy Apr 06 '16 at 21:22
  • @GlennRanders-Pehrson I can confirm it's been fixed for CR2 and NEF files too. Used version 6.9.3-8 Q16 x64. Regards :) – Voy Apr 26 '16 at 16:57