ImageData Question...
Chipp Walters
chipp at chipp.com
Thu Sep 12 16:17:01 EDT 2002
Fixed my own problem...
It turn out that on the PC, the RGB values are reversed...
so, instead of 0,R,G,B
it's B,G,R,0 order
then a couple of optimizations and minor bugfixes...
voila! this works.
Ken, You might make a note on your webpage.
on putImage1intoImage2
put the imageData of Image1 into timagedata
put 1 into y
repeat for each char C in timagedata
--convert to RGB space
put charToNum(char y of timagedata) into tB
put charToNum(char y + 1 of timagedata) into tG
put charToNum(char y + 2 of timagedata) into tR
put charToNum(char y + 3 of timagedata) into t0
put y+4 into y
put binaryEncode("CCCC",tB,tG,tR,t0) after tconvData
end repeat
set the width of img 2 to the width of img 1
set the height of img 2 to the height of img 1
set the imagedata of img 2 to tconvdata
end putImage1intoImage2
More information about the use-livecode
mailing list