On Apr 17, 9:16 pm, Thomas Richter <t...@math.tu-berlin.de> wrote:
mathieu wrote:
I just found yet another broken JPEG file:
http://gdcm.sourceforge.net/thingies/GENESIS_SIGNA-JPEG-CorruptFrag.jpg
jpeginfo gives me:
$ ./bin/jpegdump16 -verbose /tmp/GENESIS_SIGNA-JPEG-
CorruptFrag.jpg
Independent JPEG Group's JPEGDUMP, version 6b 27-Mar-1998
Copyright (C) 1998, Thomas G. Lane
Start of Image
Define Huffman Table 0x00
Start Of Frame 0xc3: width=256, height=256, components=1
Component 0: 1hx1v q=0
Start Of Scan: 1 components
Component 0: dc=0 ac=0
Ss=1, Se=0, Ah=0, Al=0
monochrome
lossless (sequential)
Huffman
trying to decompress the image I am getting:
$ ./bin/djpeg16 -outfile dummy.pnm /tmp/GENESIS_SIGNA-JPEG-
CorruptFrag.jpg
Corrupt JPEG data: 121 extraneous bytes before marker 0xd9
So what's again your question? Yes, you can break JPEG files, and
actually any other stream as well. (-;
I was hoping that someone would jump in, and say: "of course, your
huffman table is off by one", or "no your predictors are wrong..."
This JPEG comes from a DICOM file, and it looks like IMHO that it
might be possible to still read it properly with a properly patched
JPEG library. That's all.