summaryrefslogtreecommitdiff
path: root/pdf-over-commons/src/main/java
diff options
context:
space:
mode:
Diffstat (limited to 'pdf-over-commons/src/main/java')
-rw-r--r--pdf-over-commons/src/main/java/at/asit/pdfover/commons/utils/ImageUtil.java12
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;
+ }
}