Marco Metting created PDFBOX-1548:
-------------------------------------

             Summary: PDJpeg gots drawn in wrong colors when resized -> Adobe 
Reader -> Windows XP & 7
                 Key: PDFBOX-1548
                 URL: https://issues.apache.org/jira/browse/PDFBOX-1548
             Project: PDFBox
          Issue Type: Bug
    Affects Versions: 1.7.1, 1.7.0
         Environment: Windows XP & Windows 7 -> Adobe Reader (11.0.2)
            Reporter: Marco Metting


When creating a PDF and drawing PDJpegs to it, the images' colors are changed / 
inverted when resizing the PDJpeg(s) before drawing them to the PDF. This issue 
is only visible on Windows XP and Windows 7 using e.g. Adobe Reader. Preview on 
Mac or the new PDF-previewer build in Windows 8 is somehow not affected by this.

This is what I do in code:
1.) Create PDDocument
2.) Create HashMap of PDJpegs (for caching purpose):
     - Create PDJpegs by BufferedImage initialised through ImageIO.read()
     - Resize PDJpegs by calling setHeight() and setWidth()
     - Adding PDJpeg to HashMap
3.) Create PDPage and add it to PDDocument
4.) Create PDPageContentStream
5.) Draw some PDJpegs on the PDPage
6.) Close PDPageContentStream
7.) Save PDDocument
8.) Close PDDocument

If the BufferedImages are resized before initialising the PDJpegs, everything 
works fine, but they don't look that sharp.

Please provide some help, since I'm hanging on this for days now.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira

Reply via email to