Convert transparent PNG on import?

BNig bernd.niggemann at
Tue Feb 3 03:37:21 EST 2015

Hi Marty,

would it help if the transparent parts where just a little non-transparent?
hardly noticeble 

You would set all 0 to 1 in alphaData, the rest is unchanged.

on mouseUp
   put the alphaData of image 1 into tAlpha
   put numToByte(0) into tNull
   put numToByte(1) into tOne
   repeat for each byte anAlpha in tAlpha
      if anAlpha = tNull then
         put tOne after tCollect
         put anAlpha after tCollect
      end if
   end repeat
   set the alphaData of image 1 to tCollect
end mouseUp

this is fairly fast, works also in 7.x.x

Once you change 0 to 1 in alphaData the translucent parts of the png receive
mouseClicks etc. You must be aware of that.

Kind regards

View this message in context:
Sent from the Revolution - User mailing list archive at

More information about the Use-livecode mailing list