Images and Image Data

Chipp Walters chipp at chipp.com
Sat Jul 6 00:32:00 EDT 2002


Why don't you just do

set the blendlevel of img "someimage" to 75

Does the same thing on my Windows machine.
?????

> -----Original Message-----
> From: metacard-admin at lists.runrev.com
> [mailto:metacard-admin at lists.runrev.com]On Behalf Of Yennie at aol.com
> Sent: Friday, July 05, 2002 6:20 PM
> To: metacard at lists.runrev.com
> 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