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.

Author
Message
Rob from Scotland
21
Years of Service
User Offline
Joined: 23rd Aug 2003
Location: Scotland
Posted: 25th May 2015 19:31
I think that I can use Getimage(screen,0,0, GetVirtualWidth(), GetVirtualHeight()) or something like it to get an image called screen but can I save this image to my hard disk or to OneDrive.

I want to put images of my AppGameKit apps on my web site. Any ideas?
Conjured Entertainment
AGK Developer
19
Years of Service
User Offline
Joined: 12th Sep 2005
Location: Nirvana
Posted: 25th May 2015 19:41 Edited at: 25th May 2015 19:44
Use your PrintScrn key on your keyboard whilst running a test of the app on your PC.
Then paste that to a layer or canvas in your favorite paint program.

Then trim the desktop part of the image away to leave only the game's screen shot.
Then use the Device Art Generator at Google to drop that image into a selected device for a proper screenshot.


Coding things my way since 1981 -- Currently using AppGameKit V2 Tier 1
Rob from Scotland
21
Years of Service
User Offline
Joined: 23rd Aug 2003
Location: Scotland
Posted: 25th May 2015 20:40
Thanks. I tried this and a bitmap of the window behind the screen was saved to the clipboard either a listing of my app if I ran it from within AppGameKit or the desktop if I ran the application produced by AGK.

I am running Windows8.1
Markus
Valued Member
20
Years of Service
User Offline
Joined: 10th Apr 2004
Location: Germany
Posted: 25th May 2015 22:51
u can use SaveImage( iImageIndex, filename )
in v2 it should appear in appdata folder.

at android device u can use a key combination to make a screenshot.
at my handy it is hit on/off + volume down at the same time.

AGK 108 (B)19 + AppGameKit V2 Beta .. : Windows 8.1 Pro 64 Bit : AMD Radeon R7 265 : Mac mini OS X 10.10 (Yosemite)
=PRoF=
21
Years of Service
User Offline
Joined: 17th Mar 2003
Location: Milton Keynes, UK
Posted: 26th May 2015 02:02
Just to add to Conjured Entertainments answer, if you hold ALT and then press the PrntScrn button it grabs only the active window.

JimHawkins
15
Years of Service
User Offline
Joined: 26th Jul 2009
Location: Hull - UK
Posted: 26th May 2015 10:59
PrntScrn will not usually capture a DirectX surface.

<<It is practically impossible to teach good programming to students that have had a prior exposure to BASIC: as potential programmers they are mentally mutilated beyond hope of regeneration.>> Dijkstra
Rob from Scotland
21
Years of Service
User Offline
Joined: 23rd Aug 2003
Location: Scotland
Posted: 26th May 2015 11:02
Thanks =PRoF= but when I use Alt/PrtSc I still get the window or desktop behind my app window being saved to the clipboard as a bitmap. From long experience I guess that I am doing something wrong

I'll try Markus' idea after breakfast.
CJB
Valued Member
20
Years of Service
User Offline
Joined: 10th Feb 2004
Location: Essex, UK
Posted: 26th May 2015 11:24
Hi Rob.

I've never had a problem using alt/prtscrn to get screenshots in Windows - That combo should only grab the active window. You can install something like Greenshot which gives you a mass of new screen-grab features.

You can also get a screen-grab from your Android device, but the method to do this depends on what version Android you are using, and sometimes on the device. It is usually: Hold power and press volume down. Somtimes it is: Volume down + Home Button. - Once you've figured how to do it, the saved images will appear in your gallery.

Good luck!

V2 T1 (Mostly)
Uzmadesign
BatVink
Moderator
21
Years of Service
User Offline
Joined: 4th Apr 2003
Location: Gods own County, UK
Posted: 26th May 2015 13:35
Alt/PrtScrn should only work on Windows if you have hardware acceleration off. Otherwise the AppGameKit Window doesn't really exist in the Windows screen buffer, only on the hardware. You would need extra software to get the screenshot, I use FRAPs.

My preferred method would be GetImage() followed by SaveImage() Then you can programmatically grab a perfect screenshot to show off your game. For example, after an enemy is hit and is exploding on screen, do a GetImage()

Quidquid latine dictum sit, altum sonatur
TutCity is being rebuilt
Rob from Scotland
21
Years of Service
User Offline
Joined: 23rd Aug 2003
Location: Scotland
Posted: 26th May 2015 13:41
Thanks CJB.

I installed Greenshot and it is often able to capture my app's window and that is all that I need, so, problem solved.

Thanks to everyone for your help.
Rob from Scotland
21
Years of Service
User Offline
Joined: 23rd Aug 2003
Location: Scotland
Posted: 26th May 2015 14:00
Thanks BatVink.

I had sent off my last note when I discovered yours. Using Greenshot I have not yet been able to grab an explosion, which would be nice, so I will play around with GetImage() followed by SaveImage() as you and Markus suggest.
fog
21
Years of Service
User Offline
Joined: 5th Oct 2003
Location: Newcastle, England
Posted: 26th May 2015 18:27 Edited at: 26th May 2015 18:28
Yeah I use GetImage() and SaveImage() wrapped in a ScreenDump() method (it's mapped to the TAB key if anyone wants a screenie in Echoes+ or 1982 )

For a good screenshot of an explosion I have an overloaded version of the ScreenDump( int delay ) method that takes a time delay. When the explosion is triggered I call ScreenDump with say a 1/2sec delay and that catches the explosion at it's best. Very useful and much easier than trying to grab it manually.

Markus
Valued Member
20
Years of Service
User Offline
Joined: 10th Apr 2004
Location: Germany
Posted: 26th May 2015 18:56
btw, a good screenshot tool is "Ashampoo Snap"
https://www.ashampoo.com/en/eur/pin/1224/multimedia-software/Ashampoo-Snap-8
member discount 12€
me have version 4 from a pc magazine.

AGK 108 (B)19 + AppGameKit V2 Beta .. : Windows 8.1 Pro 64 Bit : AMD Radeon R7 265 : Mac mini OS X 10.10 (Yosemite)
Conjured Entertainment
AGK Developer
19
Years of Service
User Offline
Joined: 12th Sep 2005
Location: Nirvana
Posted: 27th May 2015 00:43 Edited at: 27th May 2015 00:51
Quote: "Thanks. I tried this and a bitmap of the window behind the screen was saved to the clipboard either a listing of my app if I ran it from within AppGameKit or the desktop if I ran the application produced by AGK."

That is odd, because it works fine for me.

Quote: "Just to add to Conjured Entertainments answer, if you hold ALT and then press the PrntScrn button it grabs only the active window."

CooL, I'll try that next time and save a step.

Quote: "PrntScrn will not usually capture a DirectX surface."

I have always used the Prnt Scrn key to grab whatever is on my screen.
It has always worked for me by copying whatever is showing on my screen.
The only exception would be Copyright Protected Movies that add a layer to foul it up. (but you shouldn't be grabbing those anyway (even if you are in the shot))

Quote: "Alt/PrtScrn should only work on Windows if you have hardware acceleration off. Otherwise the AppGameKit Window doesn't really exist in the Windows screen buffer, only on the hardware. You would need extra software to get the screenshot, I use FRAPs."

I use Fraps too, but not for single frames.

Quote: "u can use SaveImage( iImageIndex, filename )
in v2 it should appear in appdata folder.

at android device u can use a key combination to make a screenshot.
at my handy it is hit on/off + volume down at the same time."

Quote: "My preferred method would be GetImage() followed by SaveImage() Then you can programmatically grab a perfect screenshot to show off your game. For example, after an enemy is hit and is exploding on screen, do a GetImage()"

Quote: "Yeah I use GetImage() and SaveImage() wrapped in a ScreenDump() method (it's mapped to the TAB key if anyone wants a screenie in Echoes+ or 1982 )"

Cool thing to know, especially for 1982.
I get into some hairy situations in that thing, which would make great screen shots.

Nice feature to have in the game, so definitely the better way to go.
At first I was just thinking of getting the screenshot on the web, but this is a much better idea, and a great feature for users.


Coding things my way since 1981 -- Currently using AppGameKit V2 Tier 1
Rob from Scotland
21
Years of Service
User Offline
Joined: 23rd Aug 2003
Location: Scotland
Posted: 27th May 2015 14:27
I downloaded Fraps and I can now get screenshots including explosions and laser beams by making a Fraps movie, running it, pausing it and then pressing the hot key to take a screenshot.

I realise that using the programming method would be better for me but, I am lazy, so its Fraps for me.
fog
21
Years of Service
User Offline
Joined: 5th Oct 2003
Location: Newcastle, England
Posted: 28th May 2015 22:43
Quote: "I realise that using the programming method would be better for me but, I am lazy, so its Fraps for me. "

Doing it in code has a lot of other advantages. For example, in my debugger if an error is found it automatically takes a screenshot and inserts it into my debug log. (the log files are written in html so the screenshot appears in them, timestamped, alongside any error text.)

Or when Twitter etc are working reliably you could give the user the option of uploading a screenshot of their latest highscore which is a great for generating interest in your game.

BatVink
Moderator
21
Years of Service
User Offline
Joined: 4th Apr 2003
Location: Gods own County, UK
Posted: 8th Jun 2015 18:37
This thread and some of the ideas presented caught my interest. Consequently this month's newsletter tutorial is all about taking screenshots. It's just like the previous tutorials: you can simply drop in the code and it will work out of the box with just a few parameters, or you can take it apart, learn from it and tell me how I could have done it better!

You'll find lots of the ideas suggested above in the screenshot module.

The Ultimate Selfie is here.

Quidquid latine dictum sit, altum sonatur
TutCity is being rebuilt

Login to post a reply

Server time is: 2024-11-25 22:46:33
Your offset time is: 2024-11-25 22:46:33