How to extract JBIG2 images as BufferedImages

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
1 message Options
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

How to extract JBIG2 images as BufferedImages

mhcuervo
I have been using a custom RenderListener implementation to extract images from PDFs on a per page basis. This works fine for most of the images. However, I've found that the getBufferedImage() method of the PdfImageObject that can be obtained from the ImageRenderInfo always returns "null" when the image is encoded JBIG2. Registering a JBIG2 ImageIO reader didn't solve the problem. It seems that no proper reader can be found that is able to decode the image bytes. Probably I'm missing the JBIG2 globals but I do not find a straightforward way making things happen.
So my questions are:
- What am I missing?
- Can anyone recommend a different approach to my main goal -> extract all images from each PDF page including those encoded JBIG2?
Thanks in advance,
Miguel
Loading...