Out of memory for dates

Started by mazeckenrode, January 31, 2021, 10:35:40 PM

Previous topic - Next topic

mazeckenrode

I'm getting "out of memory" message when trying to write various date/time tags to a 70 MB PNG. Maybe related to whatever caused this (Out of memory error when writing Orientation tag), which has apparently been fixed?

Using ExifTool v12.16 Windows command line version on a Win 10 Pro 64-bit system with 16 GB RAM.

Full command line I'm trying to use:

ExifTool -m "-EXIF:DateTimeOriginal<filename" "-XMP:DateTimeOriginal<filename" "-IPTC:DateCreated<${filename;m/^(\d{4})[-_;\., ]*(\d{2})[-_;\., ]*(\d{2})/;$_=$1.$2.$3}" "-IPTC:TimeCreated<${filename;m/^\d{4}[-_;\., ]*\d{2}[-_;\., ]*\d{2}[-_;\., ]*(\d{2})[-_;\., ]*(\d{2})[-_;\., ]*(\d{2})/;$_=$1.$2.$3}" .

Just in case the combination of large file size and complex multi-tag with regex operation was a factor, I also tried writing EXIF:DateTimeOriginal and XMP:DateTimeOriginal individually, but got same result.

I will be needing to perform this same operation on some upcoming larger files (>100 MB) as well.

WeTransfer link for 7-zip with problem PNG coming separately to you, Phil.

mazeckenrode

FYI, I'm getting the same error for multiple other operations I routinely do, though not on files this large any time recently until now. Other problem operations so far include:

ExifTool -m -EXIF:ResolutionUnit=inches -EXIF:XResolution=600 -EXIF:YResolution=600 -XMP:ResolutionUnit=inches -XMP:XResolution=600 -XMP:YResolution=600 .

ExifTool -m "-EXIF:ImageDescription<${EXIF:ImageDescription;s/^(?:\xEF\xBB\xBF)?//}" "-EXIF:XPSubject<${EXIF:XPSubject;s/^(?:\xEF\xBB\xBF)?//}" "-IPTC:ObjectName<${IPTC:ObjectName;s/^(?:\xEF\xBB\xBF)?//}" "-XMP:Title<${XMP:Title;s/^(?:\xEF\xBB\xBF)?//}" "-EXIF:XPComment<${EXIF:XPComment;s/^(?:\xEF\xBB\xBF)?//}" "-XMP:UserComment<${XMP:UserComment;s/^(?:\xEF\xBB\xBF)?//}" "-IPTC:Caption-Abstract<${IPTC:ObjectName;s/^(?:\xEF\xBB\xBF)?//}" "-XMP-dc:Description<${EXIF:ImageDescription;s/^(?:\xEF\xBB\xBF)?//}" "-XMP-dc:Subject<${EXIF:XPSubject;s/^(?:\xEF\xBB\xBF)?//}" "-EXIF:XPTitle<${XMP:Title;s/^(?:\xEF\xBB\xBF)?//}" "-XMP-dc:Title<${XMP:Title;s/^(?:\xEF\xBB\xBF)?//}" "-EXIF:UserComment<${EXIF:XPComment;s/^(?:\xEF\xBB\xBF)?//}" "-EXIF:Make<${EXIF:Make;s/^(?:\xEF\xBB\xBF)?//}" "-EXIF:Model<${EXIF:Model;s/^(?:\xEF\xBB\xBF)?//}" "-EXIF:Software<${EXIF:Software;s/^(?:\xEF\xBB\xBF)?//}" "-EXIF:Artist<${EXIF:Artist;s/^(?:\xEF\xBB\xBF)?//}" "-EXIF:Copyright<${EXIF:Copyright;s/^(?:\xEF\xBB\xBF)?//}" "-EXIF:CreateDate<${EXIF:CreateDate;s/^(?:\xEF\xBB\xBF)?//}" "-EXIF:LensMake<${EXIF:LensMake;s/^(?:\xEF\xBB\xBF)?//}" "-EXIF:LensModel<${EXIF:LensModel;s/^(?:\xEF\xBB\xBF)?//}" .

Phil Harvey

I tested this with your file and the memory usage is minimal.  Are you sure you are running 12.16?

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

mazeckenrode

Ha! I was not! Good catch, and my bad. Apparently I had ExifTool in two different locations on my hard drive, and it was running from the one I forgot about. Sorry for the false alarm.