Support for metadata tagging intact images having wrong extension types

Started by devaraja@adobe.com, February 11, 2025, 11:47:52 PM

Previous topic - Next topic

devaraja@adobe.com

we are using exiftool to XMP tag the images.
Some of the files uploaded by the users are of the wrong format we are getting the following error


exiftool -XMP:CreatorTool="Adobe Express 1.0.0" -overwrite_original ~/Downloads/bruno-guerrero-pTTYDeu_Azs-unsplash.png
Error: Not a valid PNG (looks more like a JPEG) - /Users/devaraja/Downloads/bruno-guerrero-pTTYDeu_Azs-unsplash.png
    0 image files updated
    1 files weren't updated due to errors


The solution is to rename the file to a file format say JPEG in this case and tag it
This seems to be a quick and dirty fix


xyz@-MacBook-Pro-2 Downloads % exiftool -XMP:CreatorTool="Adobe Express 1.0.0" -overwrite_original ~/Downloads/test.jpg                             
    1 image files updated

can we have this added in exiftool? - so exiftool detects the format and adds the tag appropriately eventhough the file extension is wrong, when a certain config is set

Phil Harvey

I would rather not do this because it seems dangerous to me, especially when dealing with raw file formats, many of which look very much like TIFF files but may have their individual quirks.

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