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 2011/03/13 17:52:59 UTC

[jira] Resolved: (PDFBOX-958) convertToImage mangles images which were in the PDF

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

Andreas Lehmkühler resolved PDFBOX-958.
---------------------------------------

       Resolution: Fixed
    Fix Version/s: 1.6.0
         Assignee: Andreas Lehmkühler

The problem was a buggy implementation of the FlateFilter with a predictor value >= 10.
I fixed that in revision 1081149.

> convertToImage mangles images which were in the PDF
> ---------------------------------------------------
>
>                 Key: PDFBOX-958
>                 URL: https://issues.apache.org/jira/browse/PDFBOX-958
>             Project: PDFBox
>          Issue Type: Bug
>    Affects Versions: 1.2.1, 1.4.0, 1.5.0
>         Environment: RHEL5 and WinXP, java version "1.6.0_23"
>            Reporter: Eric Schwarzenbach
>            Assignee: Andreas Lehmkühler
>            Priority: Critical
>             Fix For: 1.6.0
>
>         Attachments: Image of Page 13.jpeg, Image of Page 13.png, Wrycan® Lorem Ipsum Test.pdf
>
>
> Of the PDFs we've tried running through PDFBox and generating page images, a number of them (coming from disparate sources and method of creation) seem to produce images where an image that was embedded in the page of the PDF shows somewhat mangled. It seems to be divided by horizontal stripes, where some stripes look normal, others seem to have some kind of "smearing" effect going on. See attached images and original PDF (image is of page 13).
> I marked this as critical as we are trying to use PDFBox in a project where page images are crucial, and inability to produce reasonable looking page images is pretty much a deal breaker. 
> The code we use to extract the images looks more or less like the following:
> 					BufferedImage image = page.convertToImage();
> 					
> 					SmartDeferredFileOutputStream outStream = new SmartDeferredFileOutputStream();
> 					String[] writerFormatNames = ImageIO.getWriterFormatNames();
> 					ImageIO.write(image, "jpeg", outStream);
> 					outStream.close()
> We've also tried specifying "png". In both "jpg" and "png" cases we get an image file that is indeed the correct format, and both images look exactly the same. 

--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira