Hi,

please do not use numToChar in version 7.0 and up for image manipulation, use 
numToByte or byteToNum

NumToChar is deprecated. It might work but is horribly slow.

along the lines of Mike's example

--------------------------
on mouseUp
   local tAlphaData, tTransparent, tHalfTransparent
   local tImgData, tCollect, tLength
   
   put the imageData of image 1 into tImgData
   
   -- not needed here but if you want to modify existing AD
   put the alphaData of image 1 into tAlphaData
   
   put numToByte(0) into tTransparent
   put numToByte(127) into tHalfTransparent
   put the width of image 1 * the height of image 1 into tLength
   
   repeat tLength
      -- put tTransparent after tCollect
      put tHalfTransparent after tCollect
   end repeat
   
   -- in LC 9 you have to set imagedata again explicitly
   set the imageData of image 1 to tImgData
   
   set the alphaData of image 1 to tCollect
end mouseUp
------------

Kind regards
Bernd



_______________________________________________
use-livecode mailing list
[email protected]
Please visit this url to subscribe, unsubscribe and manage your subscription 
preferences:
http://lists.runrev.com/mailman/listinfo/use-livecode

Reply via email to