
Okay, so FFD8 is a SOI marker and the error message says that the file has two of them, which apparently is a bad thing.

Using the EXIF specification (PDF), we learn that marks the start of an application segment 1 ( APP1). What you see here, is a JPEG file ( FF D8) followed by some EXIF information ( FF E1). The EXIF standardThe only helpful googling those error messages brought up was to use a hex editor. That's obviously not sufficient to get to the bottom of this, so I used GIMP and ImageMagicks convert, which both gave me the same information:Ĭonvert: Corrupt JPEG data: 1072 extraneous bytes before marker 0xd8 `test.jpg' warning/jpeg.c/EmitMessage/231.Ĭonvert: Invalid JPEG file structure: two SOI markers `test.jpg' error/jpeg.c/EmitMessage/236.Ĭonvert: missing an image filename `out.jpg' error/convert.c/ConvertImageCommand/3011.So, the two valuable information were:ġ072 extraneous bytes before marker 0xd8and

The ProblemStandard (linux) picture viewer applications would just say that they can't open the file. Tl dr: The Samsung Galaxy S2 can occasionally create corrupted JPEGs, i.e., files that don't follow the specifications. I think I've already spent more than two hours searching the not-so-all-knowing internet for solutions, but in the end it came down to using my brain and reading the EXIF specification (PDF).

Being a nerd, I couldn't resist and had to investigate the issue. While organizing some of the pictures I took with my Samsung Galaxy S2, I've encountered one file that couldn't be opened.
