Skip navigation
a569
Currently Being Moderated

JBIG2 Object Stream - Extract with file header?

Apr 17, 2011 2:11 AM

Hello,

 

I'm attempting to extract JBIG2 images only from a PDF. The only problem is that the JBIG2 images are raw data streams without a header, and so I can't just save it into a .jb2 file, as no application will recognize it.

 

It looks like this:

<</Subtype/Image/Width 1740/Height 3002/ColorSpace/DeviceGray/BitsPerComponent 1/Decode[1 0]/Length 12268/Filter/JBIG2Decode>>

stream

(DATA)

endstream

etc.

 

I can easily extract the data, but how can I repair the header?

 

Thank you.

 
Replies
  • Currently Being Moderated
    Apr 17, 2011 6:31 AM   in reply to a569

    You will need to learn the JB2 file format and construct one based on the data in the ImageXObject dictionary.

     

    Don't forget that JB2 also supports a global data block in the PDF as well, you will need that too!

     
    |
    Mark as:
  • Currently Being Moderated
    Feb 27, 2013 3:35 PM   in reply to lrosenth

    can you give a example of how to construct one?

     
    |
    Mark as:
  • Currently Being Moderated
    Feb 27, 2013 11:44 PM   in reply to anniebiyanweng

    You need to fully understand the PDF specification, then it will be clear (but still not easy).

     
    |
    Mark as:

More Like This

  • Retrieving data ...

Bookmarked By (0)

Answers + Points = Status

  • 10 points awarded for Correct Answers
  • 5 points awarded for Helpful Answers
  • 10,000+ points
  • 1,001-10,000 points
  • 501-1,000 points
  • 5-500 points