AlphaData from RGB
Chipp Walters
chipp at chipp.com
Fri Jul 30 23:04:07 EDT 2010
Er..yup. That's what I mean. I have that code below (in fact, I may have
been the one who wrote it? I did release a library of such functions a
hundred years ago...). Anycase, I was wondering if you've found any
shortcuts in the newer releases. Thanks anyway.
On Fri, Jul 30, 2010 at 2:13 AM, Scott Rossi <scott at tactilemedia.com> wrote:
> Recently, Chipp Walters wrote:
>
> > BTW, do you know if you can set the alphaimage of a new image to an
> existing
> > RGB image without having to do the math (which I already have).
>
> Do you mean alphaData? If I understand what you're asking, it sounds like
> you want to set the alphaData of one image to the imageData of another.
> The
> only way I know how to do this via the math.
>
> set alphaData of img 2 to tmImageToAlpha(imageData of img 1)
>
> function tmImageToAlpha pData
> put 2 into C
> repeat (length(pData)/4)
> put numToChar(255 - charToNum(char C of pData)) after tAlpha
> add 4 to C
> end repeat
> return tAlpha
> end tmImageToAlpha
>
> Regards,
>
> Scott Rossi
> Creative Director
> Tactile Media, UX Design
>
>
> _______________________________________________
> use-revolution mailing list
> use-revolution at lists.runrev.com
> Please visit this url to subscribe, unsubscribe and manage your
> subscription preferences:
> http://lists.runrev.com/mailman/listinfo/use-revolution
>
--
Chipp Walters
CEO, Shafer Walters Group, Inc.
More information about the use-livecode
mailing list