Garbage user comments in photos taken with Samsung Galaxy S5 mini

I keep an album of family photos that I generate with JAlbum. When I added a bunch of photos that my wife had taken with her Samsung Galaxy S5 mini smartphone, the captions in JAlbum contained copious amounts of ‘garbage’ text.

Apparently, other people have experienced this as well: One, two.

Having Linux on my laptop, the solution is just a few commands in the terminal away: exiv2 to the rescue!

To illustrate the problem, here’s a representative dump of image metadata:

Garbage Exif user comment in an image taken with a Samsung Galaxy S5 mini smartphone.
Garbage Exif user comment in an image taken with a Samsung Galaxy S5 mini smartphone.

To delete the Exif user comments (they contain only garbage anyway):

daniel@seppel5:~/Pictures/Samsung$ exiv2 -M"del Exif.Photo.UserComment" *.jpg

Interestingly, while googling more reports of this problem for this blog post, I encountered a nice write-up – evidently, the bug has been around since the days of the Samsung Galaxy S2:

http://sentryytech.blogspot.de/2013/02/fix-corrupted-jpegs-made-by-samsung.html