1
\$\begingroup\$

I'm using pyRenamer for many years without problems. Now I have some images from Huawei P20 camera and pyRenamer does not rename approx. 10% of the images. Instead of Date and Time, I get underline instead. The rename pattern I use for many years is:

`{imageyear}-{imagemonth}-{imageday}_{imagetime}_{rand1000-9999,4}_{cameramaker}_{cameramodel}.JPG`

After some research, I found out that

  • approx. 90% of all images does not have a description. pyRenamer works well with this files (left side of screenshot)

  • approx. 10% of all images have a description (right side of screenshot). All files seems to have a hexadecimal description.

enter image description here

My guess is that the description tag is the reason why pyRenamer does not work. Any ideas why Huawei adds a hexadecimal description tag into some images? Now, how can I remove the description tag of the images? Bash commands welcome.

\$\endgroup\$
3
  • \$\begingroup\$ Perhaps the description tag isn't there, and pyRenamer is misreading the image data and calling it "description"? Install exiftool, and run exiftool -s ImageDescription <file.jpg> on the files that pyRenamer says has a "description" tag. Does exiftool report the same information? \$\endgroup\$
    – scottbb
    Commented Oct 3, 2019 at 20:36
  • \$\begingroup\$ I've run exiftool -s FOV <FILENAME> and there is a description tag in "bad" image. Comparing the EXIF Informations of the two images gave me following differences: "good" Image has an empty DocumentName : . "good" Image has tag DeviceSettingDescription : (Binary data 4 bytes, use -b option to extract). \$\endgroup\$
    – Peter
    Commented Oct 4, 2019 at 6:27
  • \$\begingroup\$ "bad" Image has ImageDescription : 0590efa16b43c0871d88a7f1412e8696174ac08a1f3b2c23ef11da74d5ea1076. * "bad" Image has some additional GPS Tags: GPSAltitude, GPSDateTime, GPSLatitude, GPSLongitude, GPSPosition, GPSLatitudeRef, GPSAltitudeRef, GPSProcessingMethod, GPSVersionID, GPSLongitudeRef, GPSTimeStamp, GPSDateStamp. My gues iss still that the ImageDescription tag is causing the problems. Is it possible to remove it with exiftool? \$\endgroup\$
    – Peter
    Commented Oct 4, 2019 at 6:27

1 Answer 1

1
\$\begingroup\$

exiftool is probably the best multi-purpose tool for working with and manipulating image metadata.

You can remove undesired tags from image files using,

exiftool -overwrite_original -P -ImageDescription= <file.jpg>

If modifying or deleting tags in an image file, exiftool normally writes the resulting file to a temporary output file, so as not to clobber the original file; the -overwrite_original option causes it to write over the original file.

The -P option preserves the original file’s filesystem creation and modification time stamps (nothing to do with the image’s date-related EXIF tags). If you don’t care about preserving this file information, you can omit this option.

exiftool accepts multiple file names and wildcard file names, so you can easily batch this command to preprocess all of your problematic file.

\$\endgroup\$
1
  • \$\begingroup\$ I slightly modified your command exiftool -overwrite_original -P -ImageDescription='' <file.jpg> (added paragraph after = ). Then, the strange ImageDescription value disappeared, but pyRenamer was still unable to rename image files. So I took your advice to modify the images with exiftool on command line: exiftool -P -'Filename<${DateTimeOriginal}_0000_${Make}_${Model}'.%ue -d %Y-%m-%d_%H_%M_%S%%-c gave me exactly the file name I was looking for. \$\endgroup\$
    – Peter
    Commented Oct 4, 2019 at 20:08

Not the answer you're looking for? Browse other questions tagged or ask your own question.