[Resolved] How to use capture image as bitmap mask

Hi All

Im trying to use the display.capture() to capture a group and then use the returned image as a bitmap mask.

This does not work, I get no errors if I pass the returned capture into the setMask function but also get no masking effect.

Now with the true flag set on the display.capture function a file gets saved onto my desktop. This is no good as I can not load a file beyond the root of my project yet if I do move it into my project it can be used as a mask successfully using graphics.mask().

Maybe I could on a device.

Does any one get what Im trying to achieve? Can it be done in the sim without moving images manually?

Im guessing the issue is related to this:
http://developer.coronalabs.com/reference/bitmap-mask

“Note
An image loaded as a mask cannot be loaded as an image object and vice versa. The rule is one texture per file because the texture cache can only recognize a file as either a mask or a RGBA (Red, Green, Blue, Alpha) texture.” [import]uid: 118379 topic_id: 30193 reply_id: 330193[/import]

display.save() did the trick, missed it earlier. Works well. :slight_smile: [import]uid: 118379 topic_id: 30193 reply_id: 120923[/import]

display.save() did the trick, missed it earlier. Works well. :slight_smile: [import]uid: 118379 topic_id: 30193 reply_id: 120923[/import]