Hello,
Trying to make a standard mask effect and a weird maybe glitch is occurring.
If I use a png file that came with the Corona SDK as one of the example files as the mask for an image, it works just fine.
However, when I make a png image that I want to use as a mask in photoshop and save it as a png with the default photoshop png format settings is where the problem occurs. When I set it as a mask, the image that I attach the mask behaves weird. The area to the right of the masked portion as it should does not display any part of the image, but the part of the image to the left of the masked portion either displays fully or with wavy lines through it, and of course it should not be visible at all.
I pasted below the code that I used, so you can see there is nothing out of the ordinary there.
Also note that my png mask dimensions are significantly smaller than the image I am masking out and I even extremely moved the mask way to the right to show that I’m not still just viewing inside the masked area.
As I said before, if I move the mask to the left, the image area to the right will stop displaying as it should.
mask1 = graphics.newMask("images/mask1.png")
imageToBeMasked = display.newImage("images/imageToBeMasked.png")
imageToBeMasked:setMask(mask1)
Is there a certain exact format the png file has to be saved in in order to work properly as a mask?
Thanks in advance.
Best Regards,
Jim [import]uid: 185542 topic_id: 33424 reply_id: 333424[/import]