b = image_name.view(ʃviewer_argumentsʅ);
The
Image.view function displays the image held by the
Image object. The image will be show in an
embedded web brower. If you prefer to display the image using the system's default viewer for the image type, you can use the following syntax:
This approach will only work if the image has been saved to the disk.
Optional
named arguments can be used to control how the embedded web browser displays on Windows:
- title := string expression giving the title of the window.
- width := numeric expression specifying the width of the window in display units.
- height := numeric expression specifying the height of the window in display units.
- showCloseButton := conditional expression that, if false, hides the window's Close button.
If either the height or width is specified, then both values must be provided. Hiding the Close button also removes the margin around the web browser, so the browser will fill the entire embedded window.
The function returns a logical value of
1 (
true) if the image was displayed,
0 (
false) if there was an error viewing the image, and
default if the Image object does not contain an image.
Image tree_photo;
// ... load or take photo
tree_photo.view();
when accept("Are you satisfied with the photo of the tree?", "Yes", "No");
1 -> tree_photo.save("Tree Photo.jpg");
2 -> tree_photo.clear();
endwhen;