ImpulseAdventure / JPEGsnoop

JPEGsnoop: JPEG decoder and detailed analysis
http://www.impulseadventure.com/photo/jpeg-snoop.html
GNU General Public License v2.0
499 stars 83 forks source link

Totally MAD CD Rom: jpeg image not recognised #44

Closed nazarine666 closed 5 years ago

nazarine666 commented 5 years ago

Hi, I have been trying to decode a set of jpeg images but i have been having no luck at all. The images in question are from the "Totally MAD CD Rom" which i bought years ago I have managed to extract all the images (I think) from the CD Rom - but no jpeg viewer can open them - i can see the image files I have extracted have various markers, SOI, APP0, DQT and EOI (at the end) - so i think i have extracted them correctly. I have used your program and it identifies some of the same markers i do - but it also cannot understand the image.

I am a serious novice at jpeg decoding so i thought i would ask an expert if you can understand this image madpicture 00010

Thanks

ImpulseAdventure commented 5 years ago

The file you provided appears to be JPEG compressed, however I suspect the file has been obfuscated slightly from the standard JPEG JFIF file format. In particular, the 0xFFB9 marker is an invalid marker according to the JPEG standard, though the encoding looks to be almost identical to a standard baseline DCT marker (0xFFC0). Using a hex editor to modify the 0xFFB9 to 0xFFC0 at file offset 0x00000021 and then changing JPEGsnoop to use relaxed parsing mode will enable the decoder to proceed to the Start of Scan. Analyzing the scan segment itself, the file you provided looks like it was structurally correct. However, the file is also missing a Huffman table segment, which will prevent JPEGsnoop from decoding the variable-length coded bitstream. I tried injecting the MJPEG / AVI default DHT, but this wasn't a match for the scan segment encoding. It would be quite an involved process to identify the correct Huffman tables, so unfortunately I wouldn't be able to assist further.

Good luck!

nazarine666 commented 5 years ago

Thankyou anyway for looking - i will continue to have a play around