pdfbox-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "ASF subversion and git services (Jira)" <j...@apache.org>
Subject [jira] [Commented] (PDFBOX-4674) PDF Page Render Background Image has Gray Smudges
Date Sat, 26 Oct 2019 02:13:00 GMT

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

ASF subversion and git services commented on PDFBOX-4674:
---------------------------------------------------------

Commit 1868970 from Tilman Hausherr in branch 'pdfbox/branches/2.0'
[ https://svn.apache.org/r1868970 ]

PDFBOX-4674: make sure that USHORT_555_RGB images are properly handled if there are optimizations
in the future

> PDF Page Render Background Image has Gray Smudges
> -------------------------------------------------
>
>                 Key: PDFBOX-4674
>                 URL: https://issues.apache.org/jira/browse/PDFBOX-4674
>             Project: PDFBox
>          Issue Type: Bug
>          Components: Rendering
>    Affects Versions: 2.0.17
>            Reporter: Joseph Jezerinac
>            Priority: Major
>             Fix For: 2.0.18, 3.0.0 PDFBox
>
>         Attachments: bad_page_image.pdf, es-page-image2455431271065294360.png
>
>
> The following text produces a PNG that has gray smudges in it.  I've attached the pdf
and the PNG that is produced.
>  
> {code:java}
> public class TestPdfPageImage {
>     @Test
>     public void testGetPageImage() throws IOException {
>         try (PDDocument pdDocument = PDDocument.load(FileUtils.toFile(getClass().getResource("/bad_page_image.pdf"))))
{
>             final PDFRenderer pdfRenderer = new PDFRenderer(pdDocument);
>             final BufferedImage bufferedImage = pdfRenderer.renderImage(0);
>             final Path tempPath = Files.createTempFile("es-page-image", ".png");
>             try {
>                 final File tempFile = tempPath.toFile();
>                 ImageIO.write(bufferedImage, "png", tempFile);
>                 Assert.assertTrue(Files.size(tempPath) > 0);
>             } finally {
>                 Files.delete(tempPath);
>             }
>         }
>     }
> }
> {code}



--
This message was sent by Atlassian Jira
(v8.3.4#803005)

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


Mime
View raw message