Fixing Corrupt JPG

Occasionally images taken on my Samsung S6 have some sort of corruption that prevents me from applying tags. There is no clear pattern and it's relatively rare, maybe 1 photo in 50. The corrupt images look perfect when displayed with the standalone viewer.

As I have discovered, Opus "convert image" can repair these corrupt files. If I select JPEG conversion and write converted images to destination folder I am able to apply tags to the output file. When I select a quality level of 93 the output file is almost the same size as the original and the quality appears to be identical.

I am interested to know what Opus does to effect the repair? Whilst the output looks the same, I assume there is some minor loss of quality?

It writes out a brand new JPG file with a brand new file structure. The image will be recompressed, with probably some loss of quality (even if it's not noticeable).

If you post one of the "corrupt" ones I can look to see why setting tags fails.

Thanks @jon. I will zip and attach a sample. I'm guessing that the cause is a glitch while writing the image to the phone's storage but as I said earlier there is no obvious pattern. (4.5 MB)