exiftool command running very, very long???

Started by Jossie, June 24, 2020, 11:16:35 AM

Previous topic - Next topic

Jossie

Hello,

I have a windows bat file, which shows a strange behaviour:

   magick %1_RGB.tif %1_RGBs.tif %1_IR.tif -define tiff:fill-order=msb -define tiff:endian=msb %1_SF.tif

   exiftool -overwrite_original -m -tagsfromfile %2.tif -all:all -icc_profile %1_SF.tif
   exiftool -overwrite_original -m %1_SF.tif -ifd0:subfiletype="Full-resolution Image" -ifd1:subfiletype="Reduced-resolution image" -ifd2:subfiletype="Transparency mask"

The imagemagick-command creates the image and is very quick. Also the first exiftool command is very quick.

However, the second exiftool command runs for minutes and makes a lot of noise on the hard disk.

What is the reason for this? Am I doing something wrong here?

Hermann-Josef

Phil Harvey

Can you email me the .tif file so I can try to reproduce this?  philharvey66 at gmail.com

- Phil
...where DIR is the name of a directory/folder containing the images.  On Mac/Linux/PowerShell, use single quotes (') instead of double quotes (") around arguments containing a dollar sign ($).

Jossie

Hello Phil,

unfortunately I was so stupid to delete the example images yesterday. I created them again today in the very same way and ran the BAT file. Strange enough, now the second command was also executed almost as quick as the first one.

Yesterday I tried all sorts of things. I even rebooted the computer, but it did not help. The second command was always very, very slow.

Should it occur again, I will send you a link to the image. It is 256 MByte and cannot be mailed. Maybe the problem had to do with the fact that I had aborted the windows command shell once, when exiftool was still running. But this should have disappeared after the reboot ...

Best wishes

Hermann-Josef

Jossie

Hello Phil,

the above mentioned issue annoyed me again and I looked into it more in detail.

The whole thing is an imageJ macro, which internally calls two Windows BAT files. The first disentangles the input image, then imageJ works on the subimages and the second BAT combines the subimages again to a format identical to the input image. So far so good, everything works as intended. The last step in the second bat are the two exiftool commands given above, which just copy the tags from the input image and write some other tags.

If I run the macro after a re-boot of the computer, the macro takes 1min13sec to execute. Running the very same thing a second time takes 1min 52sec, a third time 2min52sec and a forth time 2min 02sec. During the exiftool commands in runs 2 ... 4 the hard disk gets very busy, 100% load.

So I now wrote a separate bat, which just does the critical things as given above:

magick FN_1187_0.tif FN_1187_1.tif FN_1187_2.tif -define tiff:fill-order=msb -define tiff:endian=msb FN_1187_opt.tif

exiftool -overwrite_original -m -tagsfromfile FN_1187.tif -all:all -icc_profile FN_1187_opt.tif
exiftool -overwrite_original -m FN_1187_opt.tif -ifd0:subfiletype="Full-resolution Image" -ifd1:subfiletype="Reduced-resolution image" -ifd2:subfiletype="Transparency mask"

This runs very fast and also always with the same elapse time. So I conclude, that this is not an exiftool issue but something, which must have to do with imageJ.

Hermann-Josef

Phil Harvey

Thanks for looking into this.  Problems like this can be hard to track down.

- Phil
...where DIR is the name of a directory/folder containing the images.  On Mac/Linux/PowerShell, use single quotes (') instead of double quotes (") around arguments containing a dollar sign ($).