Take Screenshot in Simulator

Would be really handy if the simulator had the ability to take a screenshot both with the device skin or of just the screen.

I know there are plenty of 3rd party tools that allow this, as I am currently using one, but would just save a little time if I could just hit a keyboard shortcut and let Corona do the rest. [import]uid: 5833 topic_id: 15930 reply_id: 315930[/import]

Both Mac and Windows have built in screen capture features. On Mac, to get a window, hit Shift-Cmd-4. Then you can either select a target area or hit spacebar. Spacebar mode lets you pick a whole window.

I think Windows has something similar…shift/ptrscrn, but I don’t remember the specific selection options.
[import]uid: 7563 topic_id: 15930 reply_id: 58916[/import]

good feature idea…

c
[import]uid: 24 topic_id: 15930 reply_id: 58917[/import]

On Windows, you can take screenshots for free by doing the following:

  1. Click on the window (to give it the focus) that you want to take a screenshot of.
  2. Hold down the ALT key and then press the PrintScreen key in that order. (Both keys must be pressed.)
  3. A screenshot of the window is now copied to the clipboard.
  4. Open Microsoft Paint.
  5. Select “Paste” from the menu or toolbar.
  6. You can now the save the screenshot to an image file.

On OS X, you can take screenshots for free using the built in “Grab” utility. You can find it in the “Applications\Utilities” folder. This tool should be more self explanatory.
[import]uid: 32256 topic_id: 15930 reply_id: 58919[/import]

I know of some of the existing options, didn’t know of the Shift+Cmd+4 ability though. Was just hoping I could be extra lazy and have Corona do the window/frame selection for me :slight_smile: [import]uid: 5833 topic_id: 15930 reply_id: 58921[/import]

Mac also ships with a command line tool called ‘screencapture’. When on Mac, you could invoke it via os.execute() in your Lua script.
[import]uid: 7563 topic_id: 15930 reply_id: 58928[/import]

+1 [import]uid: 7911 topic_id: 15930 reply_id: 58941[/import]

And in case it helps, you can press Cmd+DownArrow on your keyboard (or Hardware > Suspend in the Menu Bar) to “freeze” the Corona Simulation.

Might make it easier to get that perfect screenshot :slight_smile: [import]uid: 52430 topic_id: 15930 reply_id: 58978[/import]

and for those professional screenshots, try Layers, a paid app, but worth every cent you spend on it. as seen >a href=“http://reviewme.oz-apps.com/2011/01/ogres-are-like-onions.html”> here

cheers,

?:slight_smile: [import]uid: 3826 topic_id: 15930 reply_id: 58986[/import]

On all of my keyboards for Windows all you have to do is hit the PrtSc button…no Fn required :slight_smile:

Regards,
Jordan Schuetz
Ninja Pig Studios [import]uid: 29181 topic_id: 15930 reply_id: 59008[/import]

Pressing PrintScreen by itself captures the entire desktop. Pressing ALT+PrintScreen together only captures the window that has the focus, which comes in handy if you have a large monitor. :slight_smile: [import]uid: 32256 topic_id: 15930 reply_id: 59014[/import]

Lots more options than I realised :slight_smile: [import]uid: 5833 topic_id: 15930 reply_id: 59306[/import]

+1
Was going to request this feature, but a search found this thread.

I currently use alt-printscreen (on windows) and paste into paint.net. I then need to select and crop the window to show just the screen and be of the recommended size.

Having a simple copy to clipboard in the simulator shouldn’t take too much code. I know it doesn’t sound like much of a time saving but every little helps.

Cheers
Steve [import]uid: 107098 topic_id: 15930 reply_id: 95904[/import]

On the Mac, they also ship an app called ‘Grab’
(you need to hunt for it in utilities)
But with that running, you can choose to grab an area, the screen, or a specific window.
Using the window option gives me perfect ‘picture on device’ grabs.
No trouble.
[import]uid: 108660 topic_id: 15930 reply_id: 95928[/import]

There are tons of 3rd party applications on Windows to make doing screenshots easier. Some free, some not. To the point that there really isn’t much point for us to implement it. Do an Internet search for “Screen Capture Software” and you’ll see what I mean. :wink: [import]uid: 32256 topic_id: 15930 reply_id: 96350[/import]

On Mac you can build for Xcode simulator and you can take screenshots from there. It only saves the device screen. Also if you run it on your device while connected with xcode you can also save a screenshot from the device. [import]uid: 111017 topic_id: 15930 reply_id: 96362[/import]

On an Android device, you can take screenshots via the Android SDK tool “ddms” while the device is connected via USB. [import]uid: 32256 topic_id: 15930 reply_id: 96376[/import]

A couple of problems for me doing good screengrabs lately (on multiple devices in simulator)

I currently use  display.captureScreen() coupled with hitting a keyboard key in the simulator (now supported on Mac), but unfortunately it produces a .jpg witch doesn’t look good if you have nice tiny looking pixel graphics

I tried it on windows, where display.captureScreen()  captures a crisper .png but the keyEvents are only captured when simulating Android! OMG ಠ_ಠ

I would really like to suggest

  1. allow keyEvent to be captured on windows regardless of what device is being simulated

  2. option to output .png with display.captureScreen() on OSX or at least switch it to default .png

When you need to capture screens for several devices to put up on the store, it really makes life easier!!

Thank you that is all!

There is too a reason for CL to implement this – the screenshots needed for the App Store need to be a specific size – none of the options listed above make it easy to get that. You can get the window, but then you need to trim off the simulator stuff. And getting the exactly right is a waste of my time when the simulator could do it exactly right as many times as I desired.

Submitting the screenshots is a required part of the app development, so it fits (I think) under the game development part of Corona SDK.

 Jay

Absolutely!!! Anything that will help that 10x promise should be considered in scope. The screen shots took me about 3 hours last time I did a set. I would much rather click a button and be done with it if the option ever presented itself.