I have a photograph which I wish to stylise.
I intend to replace, both vertically and horizontally, ever second pixel's color value with that o the preceding one.
Thus, the color value of the pixel at 1,1 will also be given to the pixels at 1,2 and 2,1 and 2,2>
I have expected that the script for capturing the RGB of a given pixel might be
repeat with a = 1 to 500
if a mod 2 = 1 then
repeat with b = 1 to 500
if b mod 2 = 1 then
put a & "," & b into HV
put the backgroundColor of HV into NewColor
go to card 2
set the pencolor to NewColor
choose pencil tool
and so forth.
But the "backgroundcolor" gives me an error.
Any advice?
Capturing the RBG of a sequence of pixels
Moderators: FourthWorld, heatherlaine, Klaus, kevinmiller, robinmiller
Re: Capturing the RBG of a sequence of pixels
Hi Max,
dealing with image pixels is a bit more tricky than you may think, this may get you started to work with images and its RGB values:
http://lessons.livecode.com/m/4071/c/16770
BTW:
Variables do not have any color properties (nor any other)
Best
Klaus
dealing with image pixels is a bit more tricky than you may think, this may get you started to work with images and its RGB values:
http://lessons.livecode.com/m/4071/c/16770
BTW:
Code: Select all
...
put a & "," & b into HV
put the backgroundColor of HV into NewColor
...

Best
Klaus