mirror of
https://github.com/Stirling-Tools/Stirling-PDF.git
synced 2024-11-04 15:00:14 +01:00
perf: avoid re-rendering the first pdf page
This commit is contained in:
parent
1d243a0ca5
commit
d405b7a810
@ -236,7 +236,9 @@ public class PdfUtils {
|
||||
Graphics g = combined.getGraphics();
|
||||
|
||||
for (int i = 0; i < pageCount; ++i) {
|
||||
BufferedImage image = pdfRenderer.renderImageWithDPI(i, DPI, colorType);
|
||||
if (i != 0) {
|
||||
image = pdfRenderer.renderImageWithDPI(i, DPI, colorType);
|
||||
}
|
||||
g.drawImage(image, 0, i * image.getHeight(), null);
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user