Screen capture

Recently I was working on a demo game to showcase and test Pygmy’s GUI lib. After making some progress I decided I wanted to share an image of the current state of the game. I could have taken a picture, but it seemed more appropriate to add the capability to capture the screen to a file. Since 24 bit windows were already supported in the GUI lib ( for file creation ), I added guiSaveScreen() which captures the screen and saves it to a 24 bit windows bitmap with an auto-generated name. Here is the first test capture:

Note that there are some stray pixels in the text located in the upper left corner thanks to an oversight on my part concerning guiClearArea(). Also, the image was converted to PNG to post to WordPress which doesn’t support BMP. Support for JPEG, TGA and PNG is currently under development.


Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out /  Change )

Google+ photo

You are commenting using your Google+ account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )


Connecting to %s

%d bloggers like this: