[
https://issues.apache.org/jira/browse/PDFBOX-5876?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=18112146#comment-18112146
]
Tilman Hausherr commented on PDFBOX-5876:
-----------------------------------------
[~vbokov] this looked so good yesterday but now I ran the rendering tests and
there is a change with the file I just attached and it looks nasty. The problem
is that the subsampling is applied to the JPXSMask.
without the change:
BufferedImage@502fef58: type = 10 ColorModel: #pixelBits = 8 numComponents = 1
color space = java.awt.color.ICC_ColorSpace@31efd7b9 transparency = 1 has alpha
= false isAlphaPre = false ByteInterleavedRaster: width = 1258 height = 711
#numDataElements 1 dataOff[0] = 0
with the change:
BufferedImage@502fef58: type = 10 ColorModel: #pixelBits = 8 numComponents = 1
color space = java.awt.color.ICC_ColorSpace@31efd7b9 transparency = 1 has alpha
= false isAlphaPre = false ByteInterleavedRaster: width = 158 height = 89
#numDataElements 1 dataOff[0] = 0
> This jpeg2000 takes up a lot of memory, causing overflow.
> ---------------------------------------------------------
>
> Key: PDFBOX-5876
> URL: https://issues.apache.org/jira/browse/PDFBOX-5876
> Project: PDFBox
> Issue Type: Bug
> Components: Rendering
> Affects Versions: 2.0.32, 3.0.2 PDFBox
> Reporter: liu
> Assignee: Tilman Hausherr
> Priority: Major
> Attachments: PDFJS-16782-SMaskInData.pdf, jpeg2000.pdf
>
>
> pdf:[^jpeg2000.pdf]
> JVM:-Xmx600m
> {code:java}
> //代码占位符
> public static void main(String[] args) throws IOException,
> InterruptedException {
> File file = new File("C:\\Users\\LYCIT\\Downloads\\jpeg2000.pdf");
> PDDocument pdf = Loader.loadPDF(file,
> IOUtils.createTempFileOnlyStreamCache());
> PDFRenderer renderer = new PDFRenderer(pdf);
> int numPages = 0;
> renderer.setSubsamplingAllowed(true);
> BufferedImage bi = renderer.renderImage(numPages, 0.5f);
> pdf.close();
> } {code}
--
This message was sent by Atlassian Jira
(v8.20.10#820010)
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]