You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@pdfbox.apache.org by "Andreas Lehmkühler (JIRA)" <ji...@apache.org> on 2014/09/19 16:41:46 UTC

[jira] [Closed] (PDFBOX-2237) java.io.IOException: Image stream is empty for inline image

     [ https://issues.apache.org/jira/browse/PDFBOX-2237?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Andreas Lehmkühler closed PDFBOX-2237.
--------------------------------------

> 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: 1.8.6, 1.8.7, 2.0.0
>            Reporter: Tilman Hausherr
>            Assignee: Tilman Hausherr
>             Fix For: 1.8.7, 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.3.4#6332)