diff options
| author | bjculkin <bjculkin@WIT-9B6XG42.wvu-ad.wvu.edu> | 2018-04-26 09:14:19 -0400 |
|---|---|---|
| committer | bjculkin <bjculkin@WIT-9B6XG42.wvu-ad.wvu.edu> | 2018-04-26 09:14:19 -0400 |
| commit | a390222aeb0c5bf6982108e6fc0b492e97e43b39 (patch) | |
| tree | c2334a2e81f08952a1c79f0356a1a7459b2f5e9c /src/bjc/imgchain/ImgViewer.java | |
| parent | 8dbfbb5c87a2fa74c5e3bf829a33fc6180430e5c (diff) | |
Fix stupid pipeline bug
Diffstat (limited to 'src/bjc/imgchain/ImgViewer.java')
| -rw-r--r-- | src/bjc/imgchain/ImgViewer.java | 21 |
1 files changed, 11 insertions, 10 deletions
diff --git a/src/bjc/imgchain/ImgViewer.java b/src/bjc/imgchain/ImgViewer.java index 6876514..d632ef8 100644 --- a/src/bjc/imgchain/ImgViewer.java +++ b/src/bjc/imgchain/ImgViewer.java @@ -72,8 +72,7 @@ public class ImgViewer extends JInternalFrame { e.printStackTrace();
- JOptionPane.showInternalMessageDialog(null, msg, "Error loading image",
- JOptionPane.ERROR_MESSAGE);
+ JOptionPane.showInternalMessageDialog(null, msg, "Error loading image", JOptionPane.ERROR_MESSAGE);
}
}
}
@@ -91,7 +90,7 @@ public class ImgViewer extends JInternalFrame { private JLabel lab;
public ImgViewer(ImgChain desk, File img) {
- super("Image Viewer - " + img.getName(), true, true, true, true);
+ super("Image Viewer - " + img.getName(), false, true, true, true);
initted = false;
this.img = img;
@@ -155,11 +154,10 @@ public class ImgViewer extends JInternalFrame { e.printStackTrace();
- JOptionPane.showInternalMessageDialog(null, msg, "Error saving image",
- JOptionPane.ERROR_MESSAGE);
+ JOptionPane.showInternalMessageDialog(null, msg, "Error saving image", JOptionPane.ERROR_MESSAGE);
}
});
-
+
JMenuItem storeImage = new JMenuItem("Stash Image to Memory");
storeImage.setMnemonic('T');
storeImage.addActionListener((ev) -> {
@@ -219,8 +217,12 @@ public class ImgViewer extends JInternalFrame { Pipeline pipeline = ImgChain.chan.pipelineRepo.get(pick.pipeName);
- icon.setImage(pipeline.process(Utils.toBuffered(icon.getImage())));
- lab.repaint();
+ BufferedImage bufimg = Utils.toBuffered(icon.getImage());
+
+ Image processed = pipeline.process(bufimg);
+
+ Utils.displayImage(processed, "Pipeline Results");
+
});
editMenu.addSeparator();
@@ -250,8 +252,7 @@ public class ImgViewer extends JInternalFrame { e.printStackTrace();
- JOptionPane.showInternalMessageDialog(this, msg, "Error loading image",
- JOptionPane.ERROR_MESSAGE);
+ JOptionPane.showInternalMessageDialog(this, msg, "Error loading image", JOptionPane.ERROR_MESSAGE);
}
return lab;
|
