[REBOL] Re: Alpha channel of image! type
From: greggirwin:mindspring at: 14-Nov-2002 11:09
Hi Claude,
CP> I looked everywhere (REBOL's site, eScribe, Google) to find how to access
CP> the alpha channel in REBOL/View's image! type. What I want to do separate
CP> all 4 channel into blocks or lists or arrays, whichever is most efficient
CP> for later processing... and do it fast! Any clue is welcome.
Something along these lines?
img: load %bay.jpg
block: reduce ['r copy [] 'g copy [] 'b copy [] 'a copy []]
foreach [r g b a] img [
append block/r r
append block/g g
append block/b b
append block/a a
]
What will work best depends on what processing you're doing later and
what your actual time constraints are.
-- Gregg