Sorry your browser is not supported!

You are using an outdated browser that does not support modern web technologies, in order to use this site please update to a new browser.

Browsers supported include Chrome, FireFox, Safari, Opera, Internet Explorer 10+ or Microsoft Edge.

AppGameKit Classic Chat / [BUG] SetImageMask fails when destination image doesn't have an alpha mask (Bump)

Author
Message
blink0k
Moderator
11
Years of Service
User Offline
Joined: 22nd Feb 2013
Location: the land of oz
Posted: 13th Oct 2017 03:13
These two images are exactly the same except the one on the left had an alpha mask BEFORE SetImageMask() was applied to it.

The one on the right had no mask BEFORE SetImageMask() was applied to it. Which causes SetImageMask() to fail.

This makes the mask function a ineffective because i cannot use a mask with anything from my camera roll (Or an image that does not have a mask)




See the attached project for more detail.

Attachments

Login to view attachments
Paul Johnston
TGC Developer
21
Years of Service
User Offline
Joined: 16th Nov 2002
Location: United Kingdom
Posted: 14th Oct 2017 01:57
You need to use SetSpriteTransparency(ID,1) on the second sprite. When the image was loaded it had no alpha so would have been marked as an opaque image. Therefore sprites that use it will be opaque by default for better performance. The SetSpriteTransparency command overrides this to say you definitely want to use alpha transparency on it.
blink0k
Moderator
11
Years of Service
User Offline
Joined: 22nd Feb 2013
Location: the land of oz
Posted: 14th Oct 2017 02:16
Ah! Ok. Thanks very much

Login to post a reply

Server time is: 2024-04-20 11:21:27
Your offset time is: 2024-04-20 11:21:27