01-11-2013 01:06 PM
Is there a way to get a high resolution screenshot from the Dev Alpha simulator?
"Screenshots must be sized at either 1280x768 (landscape) or 768x1280 (Portrait) pixels"
01-11-2013 01:11 PM
01-11-2013 01:20 PM
How do you press them both at once in the simulator?
01-11-2013 01:23 PM
01-11-2013 02:02 PM
01-11-2013 02:29 PM
Press PrintScreen on your keyboard, then paste the image into Photoshop to crop it.
01-14-2013 06:09 PM - edited 01-14-2013 06:12 PM
wmatt wrote:Is there a way to get a high resolution screenshot from the Dev Alpha simulator?
"Screenshots must be sized at either 1280x768 (landscape) or 768x1280 (Portrait) pixels"
The annoying thing about trying to get the screen shots from the simulator is that it is scaled by default so using PrintScreen won't work. I haven't tried it but there is a telnet command to resize the simulator as described here https://developer.blackberry.com/develop/simulator
What I eventually settled on was just running my AIR app in the debugger and writing a PNG file out. I actually use this method for all my apps. Since I release across multiple platforms, this is a lot easier than trying to capture screen shots for a dozen different resolutions.
Here is a simplified version of the code I use. I put this in my main key handler method.
// l_screenWidth, l_screenHeight - Dimensions of the application window
// this - main sprite container. Dimensions should match app screen width and
// be located at 0, 0
// l_fileName - The name of the file. This will be located in your storage
// directory. On Windows 7 this is usually <User>/AppData/Roaming/<package>.debug
if (67 == event.keyCode) // 'c' { var l_bitmapData:BitmapData = new BitmapData(l_screenWidth, l_screenHeight, false, 0xFFFFFFFF); l_bitmapData.draw(this);
var l_stream:FileStream = new FileStream();
var l_file:File = File.applicationStorageDirectory;
l_file = file.resolvePath(l_filePName);
var l_ba:ByteArray = PNGEnc.encode(l_bitmapData);
l_stream.open(l_file, FileMode.WRITE);
l_stream.writeBytes(l_ba, 0, l_ba.length);
l_stream.close(); }
In the above example "this" can be any sprite. My apps are structured so the top level sprite is the root container and it is the same size as the screen. I did not put the complete code here. Just what was necessary. If you're going to use this you'll most likely want to add some error handling. You'll also need to get the PNGEnc class from here http://www.kaourantin.net/2005/10/png-encoder-in-a
Hope this helps somewhat.
Ken Tylman
Grim Guy Gameworks