You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@pdfbox.apache.org by "David Hoffer (JIRA)" <ji...@apache.org> on 2015/03/15 17:57:38 UTC

[jira] [Commented] (PDFBOX-1307) extracted images from a PDF sometimes come out inverted

    [ https://issues.apache.org/jira/browse/PDFBOX-1307?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14362446#comment-14362446 ] 

David Hoffer commented on PDFBOX-1307:
--------------------------------------

Yes this bug occurs in 1.8.2 & 1.8.8, any chance this could be backported to a patch to 1.8.8?  When will a beta of 2.0.0 be release?

> extracted images from a PDF sometimes come out inverted
> -------------------------------------------------------
>
>                 Key: PDFBOX-1307
>                 URL: https://issues.apache.org/jira/browse/PDFBOX-1307
>             Project: PDFBox
>          Issue Type: Bug
>          Components: Rendering
>    Affects Versions: 1.6.0
>            Reporter: Ian Holsman
>            Priority: Minor
>             Fix For: 2.0.0
>
>         Attachments: IIIm1.jpg, IIIm2.jpg, invertedImage.pdf
>
>
> Hi.
> I am extracting images from a PDF (using the code below).
> sometimes the images appear inverted
>     PDResources r = page.getResources();
>         Map<String, PDXObjectImage> images = r.getImages();
>         for (Map.Entry<String, PDXObjectImage> e : images.entrySet()) {
>             
>             BufferedImage bi = null;
>             try {
>                 bi = ((PDXObjectImage) e.getValue()).getRGBImage();
>             } catch (Exception ee) {
>                 logger.info("can't read image ;-(", ee);
>             }
>             if (bi != null) {
>                 currentPage.addImage(bi);
>                 ((PDXObjectImage) e.getValue()).write2file("/tmp/II"+e.getKey());
>             }
>         }
>        
> and i'm not sure, but there may be a memory leak grabbing the images this way as well.. but that could in my code.



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@pdfbox.apache.org
For additional commands, e-mail: dev-help@pdfbox.apache.org