From d5f0e45179f9bd70ffadb247fc53cc16a0eeeb67 Mon Sep 17 00:00:00 2001 From: Jakob Heher Date: Thu, 4 Aug 2022 13:46:58 +0200 Subject: in case i need this in the future --- .../main/java/at/asit/pdfover/commons/utils/ImageUtil.java | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/pdf-over-commons/src/main/java/at/asit/pdfover/commons/utils/ImageUtil.java b/pdf-over-commons/src/main/java/at/asit/pdfover/commons/utils/ImageUtil.java index a8740317..e3540a35 100644 --- a/pdf-over-commons/src/main/java/at/asit/pdfover/commons/utils/ImageUtil.java +++ b/pdf-over-commons/src/main/java/at/asit/pdfover/commons/utils/ImageUtil.java @@ -10,6 +10,11 @@ import javax.imageio.ImageIO; import javax.imageio.ImageReadParam; import javax.imageio.ImageReader; import javax.imageio.stream.ImageInputStream; +import javax.swing.ImageIcon; +import javax.swing.JLabel; +import javax.swing.JOptionPane; +import javax.swing.JPanel; +import javax.swing.JScrollPane; import org.slf4j.Logger; import org.slf4j.LoggerFactory; @@ -144,4 +149,11 @@ public final class ImageUtil { } return image; } + + public static java.awt.Image debugDisplayImage(java.awt.Image image) { + JPanel panel = new JPanel(); + panel.add(new JLabel(new ImageIcon(image))); + JOptionPane.showMessageDialog(null, new JScrollPane(panel)); + return image; + } } -- cgit v1.2.3