Images and Image Data
Ken Ray
kray at sonsothunder.com
Fri Jul 5 23:58:00 EDT 2002
Brian, that's awesome! How long have you know this and not told anyone? ;-)
Ken Ray
Sons of Thunder Software
Email: kray at sonsothunder.com
Web Site: http://www.sonsothunder.com/
----- Original Message -----
From: <Yennie at aol.com>
To: <metacard at lists.runrev.com>
Sent: Friday, July 05, 2002 6:19 PM
Subject: Re: Images and Image Data
> While we are still on this thread... (thanks Ken, Scott- cool stuff)...
>
> If you want to use alphaData to adjust the opacity of images, this works
real
> fast:
>
> setprop opacity x
> put min(100,x) into x
> put max(1,x) into x
> put the alphaData of me into aData
> replace (char 1 of aData) with binaryEncode("C",(255*x/100)) in aData
> set the alphaData of me to aData
> end opacity
>
> Then just say:
> ## 75% opacity
> set the opacity of image "someImage" to 75
>
> DISCLAIMER: don't use this method if you do anything which sets alphaData
> values which vary anywhere within the alphaData. If you do, you can do
this,
> which is still faster than building byte-by-byte:
>
> put binaryEncode("C",(255*x/100)) into x
> repeat with i=1 to 255
> replace numToChar(i) with x in aData
> end repeat
>
> Best Regards,
> Brian
> _______________________________________________
> metacard mailing list
> metacard at lists.runrev.com
> http://lists.runrev.com/mailman/listinfo/metacard
>
More information about the metacard
mailing list