Question about ImageMorph

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
4 messages Options
Reply | Threaded
Open this post in threaded view
|

Question about ImageMorph

MD-10
Hi,
I have a ImageMorph that I am displaying at the top of another ImageMorph. The top ImageMorph has a white background. Is there any way I can make the background of the top ImageMorph transparent so that the ImageMorph at the back is also visibile? I tried using beTransparant: true but that didn't help.

Thanks,
-Manas



Reply | Threaded
Open this post in threaded view
|

Re: Question about ImageMorph

tblanchard
The morph has the image as a Form.  Calling form or image on an  
ImageMorph will give you the form.  Its the form you want to fiddle  
with.  You might try something like:

anImageMorph image: (ColorForm mappingWhiteToTransparentFrom:  
anImageMorph image)

Or follow this method and figure out how to declare some other color  
should be mapped to transparent.

-Todd Blanchard

On Aug 6, 2006, at 1:42 PM, Manas Dadarkar wrote:

> Hi,
> I have a ImageMorph that I am displaying at the top of another  
> ImageMorph. The top ImageMorph has a white background. Is there any  
> way I can make the background of the top ImageMorph transparent so  
> that the ImageMorph at the back is also visibile? I tried using  
> beTransparant: true but that didn't help.
>
> Thanks,
> -Manas
>
>


Reply | Threaded
Open this post in threaded view
|

Re: Question about ImageMorph

Manas Dadarkar-3

Hi Todd,
   Thanks for your answer. When I try to run this
method on my morph, I get the following message

Error: Argument depth must be 8 bits per pixel or
less.

Any suggestions?

Thanks,
-Manas

--- Todd Blanchard <[hidden email]> wrote:

> The morph has the image as a Form.  Calling form or
> image on an  
> ImageMorph will give you the form.  Its the form you
> want to fiddle  
> with.  You might try something like:
>
> anImageMorph image: (ColorForm
> mappingWhiteToTransparentFrom:  
> anImageMorph image)
>
> Or follow this method and figure out how to declare
> some other color  
> should be mapped to transparent.
>
> -Todd Blanchard
>
> On Aug 6, 2006, at 1:42 PM, Manas Dadarkar wrote:
>
> > Hi,
> > I have a ImageMorph that I am displaying at the
> top of another  
> > ImageMorph. The top ImageMorph has a white
> background. Is there any  
> > way I can make the background of the top
> ImageMorph transparent so  
> > that the ImageMorph at the back is also visibile?
> I tried using  
> > beTransparant: true but that didn't help.
> >
> > Thanks,
> > -Manas
> >
> >
>
>


__________________________________________________
Do You Yahoo!?
Tired of spam?  Yahoo! Mail has the best spam protection around
http://mail.yahoo.com 

Reply | Threaded
Open this post in threaded view
|

Re: Question about ImageMorph

tblanchard
anImageMorph image replaceColor: (Color white) withColor: (Color  
transparent)?

dig around in Form and ColorForm.

On Aug 7, 2006, at 5:04 PM, Manas Dadarkar wrote:

>
> Hi Todd,
>    Thanks for your answer. When I try to run this
> method on my morph, I get the following message
>
> Error: Argument depth must be 8 bits per pixel or
> less.
>
> Any suggestions?
>
> Thanks,
> -Manas
>
> --- Todd Blanchard <[hidden email]> wrote:
>
>> The morph has the image as a Form.  Calling form or
>> image on an
>> ImageMorph will give you the form.  Its the form you
>> want to fiddle
>> with.  You might try something like:
>>
>> anImageMorph image: (ColorForm
>> mappingWhiteToTransparentFrom:
>> anImageMorph image)
>>
>> Or follow this method and figure out how to declare
>> some other color
>> should be mapped to transparent.
>>
>> -Todd Blanchard
>>
>> On Aug 6, 2006, at 1:42 PM, Manas Dadarkar wrote:
>>
>>> Hi,
>>> I have a ImageMorph that I am displaying at the
>> top of another
>>> ImageMorph. The top ImageMorph has a white
>> background. Is there any
>>> way I can make the background of the top
>> ImageMorph transparent so
>>> that the ImageMorph at the back is also visibile?
>> I tried using
>>> beTransparant: true but that didn't help.
>>>
>>> Thanks,
>>> -Manas
>>>
>>>
>>
>>
>
>
> __________________________________________________
> Do You Yahoo!?
> Tired of spam?  Yahoo! Mail has the best spam protection around
> http://mail.yahoo.com