(set image (retrieve-url-image "file:/usr/local/isis/media/nana.jpg")) (set win (easywin-create image "Nana")) (easywin-close win)
The win-buf command will return the current Isis image serving as the buffer for the window. The user is free to modify this buffer as needed, and then call win-output to display it on the device. win-output will return the next Isis image that will serve as the buffer for the window. Several different buffers may be in use depending on the device, so it is important to obtain the current buffer after each win-output command. Furthermore, image data placed in these buffers may not survive after each win-output command, so all frames should be prepared from scratch.
The win-put command transfers the specified image into the current window buffer at an optional position. Several win-put commands may be made in succession, but changes will not be made visible until a win-output command is passed.
Advanced users may use the win-combfunc command to specify the function used by win-put to transfer images into the window buffer. The function should accept two arguments: the win-put command list, and the destination image buffer. The default is a simple transfer function that works for images with 1 or 3 channels.
win-close closes and destroys the window and frees any resources that were allocated. Do not attempt to call the window object again after this command.
Below are a few examples:
(set image (retrieve-url-image "file:/usr/local/isis/media/nana.jpg")) (set win (win-create [win-pos [500 500]] [win-title "Nana"] [win-size (+ (image buf-dims) [50 50])] [win-put image [25 25]] [win-output])) (set winbuf (win [win-buf])) (image-gainbias 0.5 64 image (isolate-sub-image [25 25] (image buf-dims) winbuf)) (win [win-output]) (set winbuf (win [win-buf])) (image-fill-constant 255 (isolate-channel 0 winbuf)) (image-fill-constant 128 (isolate-channel 1 winbuf)) (image-fill-constant 64 (isolate-channel 2 winbuf)) (win [win-output]) (set framesize [640 480]) (set win2 (win-create [win-type "external"] [win-size framesize] [win-put image (/ (- framesize (image buf-dims)) [2 2])] [win-output])) (win [win-close]) (win2 [win-close])
Scripts: | (load "image-window.isis")
|
Other: | At least one of the following libraries should be
operational: OpenGL, MIL, MME video, or X windows |