[REBOL] REBOL/Power-Tools/Graphics INVERT-IMAGE function!
From: robbo1mark::aol::com at: 1-Mar-2001 6:32
More REBOL/Power-Tools,
here a little graphics function which inverts an image file and saves to a new file,
after previewing the inverted image, requires REBOL/View.
invert-image: func [image [file! url!] target [file! url!]][
image: load image
new-pic: make image! image/size
i: 1 repeat this (image/size/x * image/size/y) [
poke new-pic i complement pick image 1 i: i + 1 image:
next image]
face/image: new-pic face/size: new-pic/size
view face
save target new-pic
]
cheers,
mark Dickson