Search code examples
imagejpegcorruption

Error Interpreting JPG file: Not a JPG file: starts with 0xff 0x28


I do get the following error every time I try to open a JPG file : Not a JPG file: starts with 0xff 0x28

enter image description here

In the command line I do not seem to get any further hints or info about what is wrong:

$ file P1000868.JPG 
  P1000868.JPG: data

    $ identify P1000868.JPG
      identify: Not a JPEG file: starts with 0xff 0x28 `P1000868.JPG' @ 
      error/jpeg.c/JPEGErrorHandler/322.

Would you please let me know how can I retrieve my image info? I already tried changing the format to *.PNG, *.JPEG etc. and nothing helps. In fact the file was *.JPG and I could open it.


Solution

  • A JPEG stream starts with an SOI marker FFD8. If your stream starts with FF28, it is not [valid] JPEG. There is no FF28 marker in JPEG so something is really screwed up with the data.