You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@pdfbox.apache.org by "Ian Holsman (JIRA)" <ji...@apache.org> on 2012/05/13 10:50:48 UTC
[jira] [Created] (PDFBOX-1307) extracted images from a PDF
sometimes come out inverted
Ian Holsman created PDFBOX-1307:
-----------------------------------
Summary: 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
Affects Versions: 1.6.0
Reporter: Ian Holsman
Priority: Minor
Attachments: 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 is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira
[jira] [Updated] (PDFBOX-1307) extracted images from a PDF
sometimes come out inverted
Posted by "Ian Holsman (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/PDFBOX-1307?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Ian Holsman updated PDFBOX-1307:
--------------------------------
Attachment: invertedImage.pdf
images contained in it are inverted
> 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
> Affects Versions: 1.6.0
> Reporter: Ian Holsman
> Priority: Minor
> Attachments: 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 is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira
[jira] [Updated] (PDFBOX-1307) extracted images from a PDF
sometimes come out inverted
Posted by "Ian Holsman (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/PDFBOX-1307?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Ian Holsman updated PDFBOX-1307:
--------------------------------
Attachment: IIIm2.jpg
IIIm1.jpg
images extracted
> 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
> Affects Versions: 1.6.0
> Reporter: Ian Holsman
> Priority: Minor
> 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 is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira