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 / overlay/merge images

Author
Message
qwedsa
15
Years of Service
User Offline
Joined: 5th Jan 2009
Location:
Posted: 16th May 2012 06:19
is it possible to take an image with transparency, and add it to a sprite or image (the areas that are transparent, would remain unchanged)?

how is a sprite's image memory stored? as separate images?
baxslash
Valued Member
Bronze Codemaster
17
Years of Service
User Offline
Joined: 26th Dec 2006
Location: Duffield
Posted: 16th May 2012 17:15 Edited at: 16th May 2012 17:16
Quote: "is it possible to take an image with transparency, and add it to a sprite or image"

Yes. You need to use the drawSprite() command and then getImage() if you want to combine 2 images. Something like this:

spr2 would use the transparent image and you need to position / rotate the however to suit your needs...

BatVink
Moderator
21
Years of Service
User Offline
Joined: 4th Apr 2003
Location: Gods own County, UK
Posted: 16th May 2012 23:53
I've found a problem with this. The transparent areas on the top image, apply the same transparency to the GetImage() result....


http://forum.thegamecreators.com/?m=forum_view&t=196575&b=41

qwe
21
Years of Service
User Offline
Joined: 3rd Sep 2003
Location: place
Posted: 17th May 2012 04:47
drawSprite is not a command
qwe
21
Years of Service
User Offline
Joined: 3rd Sep 2003
Location: place
Posted: 17th May 2012 05:55
getImage also does not appear to be a command?
bjadams
AGK Backer
16
Years of Service
User Offline
Joined: 29th Mar 2008
Location:
Posted: 17th May 2012 08:44
Qwe you need to use the latest 107+ version of AGK
baxslash
Valued Member
Bronze Codemaster
17
Years of Service
User Offline
Joined: 26th Dec 2006
Location: Duffield
Posted: 17th May 2012 10:52
Quote: "I've found a problem with this. The transparent areas on the top image, apply the same transparency to the GetImage() result....
"

I haven't had that problem. I'll have to test it. Thanks for the heads up batvink!

Login to post a reply

Server time is: 2024-11-23 11:43:58
Your offset time is: 2024-11-23 11:43:58