Manipulating Raw Picture Data
Mark Schonewille
m.schonewille at economy-x-talk.com
Wed Jun 25 19:38:10 EDT 2008
Hi Mark,
I believe you want something like this:
put NULL & numToChar(red) & numToChar(green) & numToChar(blue) into
myColor1
put NULL & numToChar(red2) & numToChar(green2) & numToChar(blue2) into
myColor2
put the imageData of img 1 into myData
replace myColor1 with myColor2 in myData
set the imageData of img 1 to myData
--
Best regards,
Mark Schonewille
Economy-x-Talk Consulting and Software Engineering
http://economy-x-talk.com
http://www.salery.biz
Benefit from our inexpensive hosting services. See http://economy-x-talk.com/server.html
for more info.
On 26 jun 2008, at 01:29, Mark Greenberg wrote:
> I have an image where different regions consist of known colors. I
> would like to fill a region with color at runtime as a sort of
> highlight. The situation does not lend itself to using separate
> transparent png images. I have been using the floodfill bucket tool
> to achieve this, but it is slow and doesn't work right when I
> compile to standalone.
>
> I've read various threads on manipulating the raw picture data and
> seen a couple of stacks like that. It seems a bit beyond my skills
> as a casual programmer, but I may need to give it a try. Two
> questions: would sampling every pixel in a 600x400 image and
> possibly changing the pixel's color be fast enough to seem like a
> highlight to the user? and how would I go about doing that?
>
> Thanks in Advance,
>
> Mark Greenberg
More information about the use-livecode
mailing list