Skip to content

Commit c24e0a4

Browse files
committed
Merge pull request #480 from ThomasJClark/image-preview
Make image previews actually work
2 parents 11388ac + 3dc8dcd commit c24e0a4

1 file changed

Lines changed: 3 additions & 2 deletions

File tree

ui/src/main/java/edu/wpi/grip/ui/preview/ImageSocketPreviewView.java

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ public class ImageSocketPreviewView extends SocketPreviewView<Mat> {
2121
private final ImageView imageView;
2222

2323
/**
24-
* @param socket An output socket to preview
24+
* @param socket An output socket to preview
2525
*/
2626
ImageSocketPreviewView(GRIPPlatform platform, OutputSocket<Mat> socket) {
2727
super(socket);
@@ -31,6 +31,8 @@ public class ImageSocketPreviewView extends SocketPreviewView<Mat> {
3131
this.setContent(imageView);
3232

3333
assert Platform.isFxApplicationThread() : "Must be in FX Thread to create this or you will be exposing constructor to another thread!";
34+
35+
convertImage();
3436
}
3537

3638
@Subscribe
@@ -45,7 +47,6 @@ private void convertImage() {
4547
final Image image = this.imageConverter.convert(mat);
4648
this.imageView.setImage(image);
4749
});
48-
4950
});
5051
}
5152
}

0 commit comments

Comments
 (0)