diff --git a/src/ooxml/java/org/apache/poi/xslf/util/PPTX2PNG.java b/src/ooxml/java/org/apache/poi/xslf/util/PPTX2PNG.java index c03c5579bd..435de7a33d 100644 --- a/src/ooxml/java/org/apache/poi/xslf/util/PPTX2PNG.java +++ b/src/ooxml/java/org/apache/poi/xslf/util/PPTX2PNG.java @@ -216,9 +216,8 @@ public class PPTX2PNG { break; } - final int width = Math.toIntExact(Math.round(pgsize.getWidth() * scale / lenSide)); - final int height = Math.toIntExact(Math.round(pgsize.getHeight() * scale / lenSide)); - + final int width = (int) Math.rint(pgsize.getWidth() * scale / lenSide); + final int height = (int) Math.rint(pgsize.getHeight() * scale / lenSide); for (int slideNo : slidenum) { proxy.setSlideNo(slideNo);