Using exiftool to manipulate tags without overwriting the whole image file

Started by floogy, August 16, 2013, 10:51:41 AM

Previous topic - Next topic

floogy

Hi, is there a way to only change the exif header  by using exiftool or something similar? On huge files exiftool takes a long time on windows to alter the tag information, I think because it overwrites the whole image.

I think I may need exiftool, because imagemagick omits to adjust two tags on cmyk to rgb conversion by using icc profiles, please see this IM thread:
http://www.imagemagick.org/discourse-server/viewtopic.php?f=1&t=23928

$ time exiftool -P -m -overwrite_original -ICCProfileName="eciRGB v2"  -ColorMode=RGB   image_eciRGB_v2.tif
    1 image files updated

real    1m49.219s
user    0m0.000s
sys     0m0.031s

Phil Harvey

Wow, that's slow.  How big is this file?

In my tests here, ExifTool can write large files at about the same speed as copying them with 'cp'.

There is no way to get it to just update the header.  In general, of course, this can't always work since often the header must grow, so it would require a specialized algorithm which would actually slow things down for the grow case.  ExifTool uses just one algorithm for writing.

- Phil

Edit:  I notice now you said Windows.  Yes.  Unfortunately there are memory restrictions imposed on DOS programs running in Windows which can have a severe performance penalty.  I can pretty well guarantee that the nearly 2 minutes would shrink to less than 10 seconds on Mac or Linux.
...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 ($).

floogy

Yes, the files are >60MiB and are on a NAS which might be slow too. But thank you for clarify, that everything is fine with that command.
Do you know if I can avoid those differences in EXIF by using convert, to omit this extra exiftool step?

Phil Harvey

...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 ($).