I have code that decompresses jpgs
into bit maps which works fine for JPEG files, however when I feed the code a JPEG I have stripped directly from a PDFs XObject
I get errors.
Adobe reader displays the image fine so I don't believe it's corrupted. I have read through JPEG
and PDFs
documentation and don't find any obvious problems.
My question is this, is there anything different in the "JPEG" embedded inside a PDFs stream and a normal JPEG? And if so what is it?
Note: I can manually open the PDFs, copy the image, paste into paint, and save...when I do this everything works....my problem is I need this automated.
When my code parses the PDFs, strips out the image stream, dumps the binary to a file, and then I try and open this file, it does not work. What am I missing?
My errors seem to be occurring in the Huffman decoding process, the cdt
and Huffman
tables appear to be read in fine.
pdfimages
... en.m.wikipedia.org/wiki/Pdfimages – Mark Setchell