[ALLY] colorsplitter.r
[1/1] from: d4marcus::dtek::chalmers::se at: 27-Apr-2001 20:59
Here's a funny little thing, an RGB-splitter of sorts. :-)
REBOL [
Title: "RGB color splitter"
Date: 26-Apr-2001
Author: "Marcus Petersson"
File: %colorsplitter.r
Comment: "Another fine example of what VID can do easily"
]
colorsplitter: func [im [image! file!] /local rgb a] [
rgb: make block! 3
repeat i 3 [a: poke 0.0.0 i 128
layout [a: image im effect compose [multiply (a)]]
append rgb to-image a] rgb]
test: func [im [image! file!] /local a v s] [
any [image? im im: load im]
a: colorsplitter im
v: system/view/screen-face/size / 2 - 30
s: (a/1/size)
v: max s/x / v/x s/y / v/y
s/x: s/x / v s/y: s/y / v
view/offset layout [space 0x0 style i image s []
i im i a/1 return i a/2 i a/3] 0x0
im = or a/1 or a/2 a/3]
Marcus
------------------------------------
If you find that life spits on you
calm down and pretend it's raining