mirror of
https://github.com/haraldk/TwelveMonkeys.git
synced 2025-10-04 11:26:44 -04:00
Some minor clean-up before release.
- Removing some deprecated stuff - Moving unused classes to sandbox
This commit is contained in:
@@ -5,7 +5,7 @@
|
||||
<modelVersion>4.0.0</modelVersion>
|
||||
<groupId>com.twelvemonkeys.imageio</groupId>
|
||||
<artifactId>twelvemonkeys-imageio-jmagick</artifactId>
|
||||
<version>2.2-SNAPSHOT</version>
|
||||
<version>2.2</version>
|
||||
<name>TwelveMonkeys ImageIO JMagick Plugin</name>
|
||||
<description>
|
||||
<![CDATA[
|
||||
@@ -17,7 +17,7 @@
|
||||
<parent>
|
||||
<artifactId>twelvemonkeys-imageio</artifactId>
|
||||
<groupId>com.twelvemonkeys</groupId>
|
||||
<version>2.2-SNAPSHOT</version>
|
||||
<version>2.2</version>
|
||||
</parent>
|
||||
|
||||
<dependencies>
|
||||
|
35
twelvemonkeys-imageio/pict/src/main/java/com/twelvemonkeys/imageio/plugins/pict/QDTest.java
Executable file → Normal file
35
twelvemonkeys-imageio/pict/src/main/java/com/twelvemonkeys/imageio/plugins/pict/QDTest.java
Executable file → Normal file
@@ -28,10 +28,13 @@
|
||||
|
||||
package com.twelvemonkeys.imageio.plugins.pict;
|
||||
|
||||
import com.twelvemonkeys.image.ConvolveTester;
|
||||
import com.twelvemonkeys.image.BufferedImageIcon;
|
||||
import com.twelvemonkeys.image.ImageUtil;
|
||||
|
||||
import javax.swing.*;
|
||||
import java.awt.image.BufferedImage;
|
||||
import java.awt.*;
|
||||
import java.lang.reflect.InvocationTargetException;
|
||||
|
||||
/**
|
||||
* QDTest
|
||||
@@ -125,6 +128,34 @@ public class QDTest {
|
||||
context.closePicture();
|
||||
}
|
||||
|
||||
ConvolveTester.showIt(image, "QuickDraw Test");
|
||||
showIt(image, "QuickDraw Test");
|
||||
}
|
||||
|
||||
public static void showIt(final BufferedImage pImage, final String pTitle) {
|
||||
try {
|
||||
SwingUtilities.invokeAndWait(new Runnable() {
|
||||
public void run() {
|
||||
JFrame frame = new JFrame(pTitle);
|
||||
frame.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
|
||||
frame.setLocationByPlatform(true);
|
||||
JPanel pane = new JPanel(new BorderLayout());
|
||||
GraphicsConfiguration gc = GraphicsEnvironment.getLocalGraphicsEnvironment().getDefaultScreenDevice().getDefaultConfiguration();
|
||||
BufferedImageIcon icon = new BufferedImageIcon(ImageUtil.accelerate(pImage, gc));
|
||||
JScrollPane scroll = new JScrollPane(new JLabel(icon));
|
||||
scroll.setBorder(null);
|
||||
pane.add(scroll);
|
||||
frame.setContentPane(pane);
|
||||
frame.pack();
|
||||
frame.setVisible(true);
|
||||
}
|
||||
});
|
||||
}
|
||||
catch (InterruptedException e) {
|
||||
Thread.currentThread().interrupt();
|
||||
}
|
||||
catch (InvocationTargetException e) {
|
||||
throw new RuntimeException(e);
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
Reference in New Issue
Block a user