[REBOL] Image routines
From: atruter::hih::com::au at: 17-Jan-2002 18:11
Hi all, been a lurker for a while so time to give something back . . . ;)
For those interested in basic image manipulation, I have written a simple
object to handle scrolling and zooming operations (plus rotate and emboss).
The only big restriction at this stage is the fact that the image window
size (400x400 below) must be square. Enjoy!
Regards,
Ashley
REBOL []
do http://www.dobeash.com/rebol/image.r
image/get http://www.rebol.com/view/demos/palms.jpg
view layout [
button "Rotate 0" [image/rotate img 0]
button "Rotate 90" [image/rotate img 90]
button "Rotate 180" [image/rotate img 180]
button "Rotate 270" [image/rotate img 270]
toggle "Emboss" [image/emboss img]
button "Reset" [image/reset img]
return
img: image 400x400 image/binary effect copy image/effect
return
arrow up keycode[up] [image/scroll/up img]
arrow down keycode[down] [image/scroll/down img]
arrow left keycode[left] [image/scroll/left img]
arrow right keycode[right] [image/scroll/right img]
button 24x24 "+" keycode[page-up] [image/zoom/in img]
button 24x24 "-" keycode[page-down] [image/zoom/out img]
across
text "NOTE: The arrow (up, down, left, right) and page up/down keys will also work."
]