Problem with mask

James Hurley jhurley0305 at sbcglobal.net
Tue Oct 21 10:22:28 EDT 2008


Scott Rossi wrote:

>
>> I think I need to see this in a script if I am to understand the  
>> process.
>
> I updated the "masked abe" stack to illustrate step by step how to  
> mask an
> image via snapshot/script.  Anyone should be able to use this.
> In your message box:
>
>   go url "http://www.tactilemedia.com/site_files/downloads/ 
> masked_abe.rev"
>
> Both techniques are flexible -- you can use any shape graphic as  
> the source
> shape for the mask -- but the 2nd technique allows you to use any  
> object as
> mask, not just a graphic.
>
>
>> These are clearly superior to what I was getting, but I'm trying to
>> understand where I went wrong.
>
> I'm sure there's a logical explanation, but I'm more of the mindset  
> that if
> it doesn't work one way, figure out another way, get back to work,  
> and ask
> questions later. :-)
>
> Hope this helps.
>
> Regards,
>
> Scott Rossi
> Creative Director
> Tactile Media, Multimedia & Design


Scott,

The latest mask for Abe is a TERRIFIC TUTORIAL! (If anyone else is  
interested in these masking issues check out the "go url...." above.)

And it works like a charm. The commented script is very easy to follow.

I used it to test whether the problem I was having might have been  
due to antialiasing. I ran your newAlphaData variable through a  
charToNum handler to see the tail ends of the mask and there is  
antialiasing, a few lines of 8 or 20 or 30 at either end of the 255s.  
Just to see the effect of taking these out I ran the newAlphaData  
through the following:

   repeat for each char tChar in newAlphaData
     if tChar is numToChar(255) or tChar is numTOChar(0) then
       put tChar after results
     else
       put numToChar(0) after results--or numToChar(255)
     end if
   end repeat
   put results into newALphaData

There was no visible difference on the edges. So I doubt that my  
problem with the flat edges was an antialiasing problem. But this  
isn't a definitive test of course.

Sorry to be hung up on this issue. It's a dog with a bone problem for  
me. I am not as interested in making it work as I am understanding  
why it does, or rather doesn't.

Jim  Hurley




More information about the use-livecode mailing list