diff options
author | Jakob Heher <jakob.heher@iaik.tugraz.at> | 2022-08-04 13:46:58 +0200 |
---|---|---|
committer | Jakob Heher <jakob.heher@iaik.tugraz.at> | 2022-08-04 13:46:58 +0200 |
commit | d5f0e45179f9bd70ffadb247fc53cc16a0eeeb67 (patch) | |
tree | 03b4565be4b576f0762564743a3262713a91b3c2 /pdf-over-commons/src/main/java/at/asit | |
parent | 035886dcc2c8c80944f4e7dda06b4581ff4423a1 (diff) | |
download | pdf-over-d5f0e45179f9bd70ffadb247fc53cc16a0eeeb67.tar.gz pdf-over-d5f0e45179f9bd70ffadb247fc53cc16a0eeeb67.tar.bz2 pdf-over-d5f0e45179f9bd70ffadb247fc53cc16a0eeeb67.zip |
in case i need this in the future
Diffstat (limited to 'pdf-over-commons/src/main/java/at/asit')
-rw-r--r-- | pdf-over-commons/src/main/java/at/asit/pdfover/commons/utils/ImageUtil.java | 12 |
1 files changed, 12 insertions, 0 deletions
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; + } } |