Tilman Hausherr created PDFBOX-2237:
---------------------------------------
Summary: java.io.IOException: Image stream is empty for inline
image
Key: PDFBOX-2237
URL: https://issues.apache.org/jira/browse/PDFBOX-2237
Project: PDFBox
Issue Type: Bug
Components: Rendering
Affects Versions: 2.0.0
Reporter: Tilman Hausherr
Assignee: Tilman Hausherr
Fix For: 2.0.0
Attachments: PDFBOX-2237-041715.pdf
The attached file throws an exception:
{code}
java.io.IOException: Image stream is empty
at
org.apache.pdfbox.pdmodel.graphics.image.SampledImageReader.getRGBImage(SampledImageReader.java:117)
at
org.apache.pdfbox.pdmodel.graphics.image.PDInlineImage.getImage(PDInlineImage.java:234)
at
org.apache.pdfbox.rendering.PageDrawer.drawImage(PageDrawer.java:1082)
at
org.apache.pdfbox.util.operator.graphics.BeginInlineImage.process(BeginInlineImage.java:40)
{code}
The reason is this:
{code}
BI
/H 1 /W 256 /CS /RGB /BPC 8 /F []
...
{code}
The empty filter array is incorrectly processed in PDInlineImage, it results in
an empty output stream. Checking for an empty array like checking for null
solves the problem.
--
This message was sent by Atlassian JIRA
(v6.2#6252)