[jbig2-dev] strange behaviour with embedded file and decompression error

rillian rillian@telus.net
Wed, 6 Nov 2002 16:34:10 +0000


On Monday, October 28, 2002, at 05:48  pm, eric.k@dalim.com wrote:

> I have integrated the current jbig2dec library into my code for 
> opening some pdf with embedded jbig2 stream (pdf1.4) and so I have 
> some stranges things to notice and some questions.

Hi Eric, sorry to take so long responding. What code are you 
integrating jbig2dec into?

> I have attached 2 files, a pdf with an embedded jbig2 (open fine with 
> acrobat 5) and a file with the extracted stream from this pdf.

Thanks for the test file. I confirm both the the error-printing 
segfault and the rendering difference. There are some known bugs with 
embedded stream handling, so the segfault isn't surprising and will be 
simple to fix. Keep in mind that jbig2dec is at release 0.1 and while 
useful for some real work, is just barely functional.

The noise line looks like a dirt mark in the margin is getting 
replicated across the whole page. I'll take a look at that. I've not 
had much time to work on jbig2 lately, but should have another block of 
time for it later this month.

> I have tried to reconstruct the header, end of page segment and end of 
> file segment around the file to process it as a stand alone one. It 
> doesnt work, the page is processed but nothing are saved. Maybe my eop 
> segment is wrong (00 00 00 04 33 01 00 00 00 00).

Type 0x33 is eof. eop is 0x30. Also the ubc test files don't set the 
retain bit on eop. Not sure what difference it makes. Otherwise, it's 
correct.

> If needed, I'm ready to test more files and return result to dev team.

Problem files are *very* welcome. Please send any others you discover.

Cheers,
  -r