Learn R Programming

loon (version 1.4.1)

l_imageviewer: Display Tcl Images in a Simple Image Viewer

Description

Loon provides a simple image viewer to browse through the specified tcl image objects.

The simple GUI supports either the use of the mouse or left and right arrow keys to switch the images to the previous or next image in the specified image vector.

The images are resized to fill the viewer window.

Usage

l_imageviewer(tclimages)

Value

the tclimages vector is returned

Arguments

tclimages

Vector of tcl image object names.

Examples

Run this code
if(interactive()){


img2 <- tkimage.create('photo', width=200, height=150)
tcl(img2, 'put', 'yellow', '-to', 0, 0, 199, 149)
tcl(img2, 'put', 'green', '-to', 40, 20, 130, 40)
img3 <- tkimage.create('photo', width=500, height=100)
tcl(img3, 'put', 'orange', '-to', 0, 0, 499, 99)
tcl(img3, 'put', 'green', '-to', 40, 80, 350, 95)

l_imageviewer(c(tclvalue(img2), tclvalue(img3)))

}

Run the code above in your browser using DataLab