[Resolved] Can I do a Transparent Mask?

Is there any way to create a transparent mask for a dynamic image? I want to take a picture of the user’s face and then mask out the background (outside an oval) and use the image in the app. [import]uid: 90248 topic_id: 23061 reply_id: 323061[/import]

Hi paul10,
i would try using object.alpha = 0

hope this helps take care

****EDIT i just realized this would’t work… sorry it would make your picture disappear. How about having your dynamic object follow your picture? example you have two squares one with physics the other who mimics the first rotation x and y?

[import]uid: 99036 topic_id: 23061 reply_id: 92309[/import]

Using @SoloSebo tip is nice. But if you need to still get “touch/tap” events on the background I “think” that setting it as 0 (zero) would not work and so set it to 0.1 and it should work but still be “invisible”.

EDIT: As @SoloSebo has reported it would not work for your needs you can forget what I said based on his tip. Sorry about that. :\
Cheers,
Rodrigo. [import]uid: 89165 topic_id: 23061 reply_id: 92310[/import]

This may or may not interest you but there’s some sample code for cropping that I believe Satheesh recently added to the code exchange - it may suit what you’re trying to do. [import]uid: 52491 topic_id: 23061 reply_id: 92349[/import]

I’ve been playing with the cropping (http://developer.anscamobile.com/code/useful-crop-library), but it only seems to crop black. I want to crop so that the rest of the image becomes transparent (or gone). Is this possible? I want to crop just the head so that I can put it and move it around on my own static background. [import]uid: 90248 topic_id: 23061 reply_id: 92455[/import]

Tried again, and this time it’s working perfectly. Using Satheeth’s code. I’m on my way. Thanks. [import]uid: 90248 topic_id: 23061 reply_id: 92461[/import]

Am very pleased to hear that, good luck with your project :slight_smile: [import]uid: 52491 topic_id: 23061 reply_id: 92515[/import]

Paul,

How did you get the transparent mask to work?

I want to do something like the following

I want is to have a normal colorful image (image1), that has a hazzy effect applied to it… so I can see image1 but it looks hazzy… but if the user touches a point on the image… the hazzness goes away at the touch location… [import]uid: 67619 topic_id: 23061 reply_id: 132810[/import]

Paul,

How did you get the transparent mask to work?

I want to do something like the following

I want is to have a normal colorful image (image1), that has a hazzy effect applied to it… so I can see image1 but it looks hazzy… but if the user touches a point on the image… the hazzness goes away at the touch location… [import]uid: 67619 topic_id: 23061 reply_id: 132810[/import]