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 / Stuck with GetImage()

Author
Message
Braj
10
Years of Service
User Offline
Joined: 21st Feb 2014
Location:
Posted: 8th Aug 2016 21:12
I'm kinda stuck in my test of using GetImage, below I have been trying to load 2 sprites to the screen and basically combine them into one image > create a sprite with that image > and load that sprite with confirmation that the two sprites that make up my new (3rd) sprite are deleted. Any help on how to do this with what I have would be appreciated...

BatVink
Moderator
21
Years of Service
User Offline
Joined: 4th Apr 2003
Location: Gods own County, UK
Posted: 9th Aug 2016 10:41
It look OK. Try adding a SaveImage() to see what you have captured.
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
Quidquid latine dictum sit, altum sonatur
TutCity is being rebuilt
Markus
Valued Member
20
Years of Service
User Offline
Joined: 10th Apr 2004
Location: Germany
Posted: 9th Aug 2016 11:43
maybe it need once a sync() to init the screen settings.
use spr1=LoadSprite("image1.png") and look with print(spr1) if you got a id there.
AGK (Steam) V2.0.20 : Windows 10 Pro 64 Bit : AMD (16.3.2) Radeon R7 265 : Mac mini OS X 10.10 (Yosemite)
Braj
10
Years of Service
User Offline
Joined: 21st Feb 2014
Location:
Posted: 10th Aug 2016 00:15
Thank you for the responses! I have tried both options to no avail. The program doesn't seem to be capturing the GetImage. Any other ideas?
CJB
Valued Member
20
Years of Service
User Offline
Joined: 10th Feb 2004
Location: Essex, UK
Posted: 10th Aug 2016 20:06
You need to draw the sprites to the backbuffer before you can capture them with getimage.
i.e.

at line 11, add:

drawsprite(1)
drawsprite(2)
V2 T1 (Mostly)
Phone Tap!
Uzmadesign
Braj
10
Years of Service
User Offline
Joined: 21st Feb 2014
Location:
Posted: 11th Aug 2016 01:30
Tried the DrawSprite code all over the place with different render/sync/swap combos & methods. Still getting nothing...

I know my code is drawing the sprites to the backbuffer because of the swap() command, something with GetImage() is causing the issues... I don't know why. I'm sure its the earlier code in prep of the command before its called thats causing issues. But what though? The GetImage() comes through invisible on my printimage(), but normally called images come out fine.

Any other ideas?
Paul Johnston
TGC Developer
21
Years of Service
User Offline
Joined: 16th Nov 2002
Location: United Kingdom
Posted: 11th Aug 2016 03:52
If you are using Windows this should work, but on the other platforms there was a bug that prevented GetImage from working after the latest image changes. This is fixed for the next version.
Markus
Valued Member
20
Years of Service
User Offline
Joined: 10th Apr 2004
Location: Germany
Posted: 11th Aug 2016 08:46
cjb, render do this drawing.
AGK (Steam) V2.0.20 : Windows 10 Pro 64 Bit : AMD (16.3.2) Radeon R7 265 : Mac mini OS X 10.10 (Yosemite)
CJB
Valued Member
20
Years of Service
User Offline
Joined: 10th Feb 2004
Location: Essex, UK
Posted: 11th Aug 2016 09:08
Quote: "This is fixed for the next version."
Excellent! -When?

Quote: "cjb, render do this drawing."
Quite right!
V2 T1 (Mostly)
Phone Tap!
Uzmadesign
Markus
Valued Member
20
Years of Service
User Offline
Joined: 10th Apr 2004
Location: Germany
Posted: 11th Aug 2016 10:04 Edited at: 11th Aug 2016 10:06
the player at android handy show only black, build jun 28 did not work with getimage.
AGK (Steam) V2.0.20 : Windows 10 Pro 64 Bit : AMD (16.3.2) Radeon R7 265 : Mac mini OS X 10.10 (Yosemite)
Braj
10
Years of Service
User Offline
Joined: 21st Feb 2014
Location:
Posted: 14th Aug 2016 16:59
Thanks for the response! Is there a projection for when the next version might be out?
blink0k
Moderator
11
Years of Service
User Offline
Joined: 22nd Feb 2013
Location: the land of oz
Posted: 14th Aug 2016 21:51
Maybe you could install an earlier version until the next version comes out

Login to post a reply

Server time is: 2024-09-29 17:24:26
Your offset time is: 2024-09-29 17:24:26