(C) 2011-2012 by Antoine VIGNAU and Olivier ZARDINI
is Window Capture ?
is a utility focused on screen capture. It has been designed to help in
Graphic Resources catching (backgrounds, sprites, animations,
palettes...) from games running under emulators.
Unlike Windows native Screenshot functionality (PrintScreen key),
WindowCapture capture only the content of a window (not the whole
screen) and save the results as image files on disk (file name is auto
incremented). No need to enter a graphic program anymore to paste and
save. WindowCapture can grab only a small area of the window (remove
unwanted borders). Based on the number of colors available in the
picture, it will save the image as GIF (256 or less) or BMP (True
WindowCapture can take One Shot or Record the screen and take pictures
on a regular timing (up to 100 pictures / second). This latest feature
is useful to get all the sprites used for an character animation.
WindowCapture is part of the Brutal Deluxe's Cross Developpement Tools
Project, a full set of utilities available on Windows (and other)
platforms to enable the creation of new Apple IIgs software : 65c816
Assembler, 65c816 Disassembler, 65c816 Simulator, Graphic File
Converter, Resource Catcher...
WindowCapture is Windows only.
the software (see below) and extract the content of the Archive file (WindowCapture.exe)
to your hard drive (anywhere).
the software by double clicking the icon
should access the Main
Click on the button Settings
to access the application parameters.
The button Start
is currently disabled because no window has been chosen yet.
should access the Settings
Don't need yet to understand all these features.
Just Click on the button Select
Window. (Upper right)
should access the Window
will display all available Windows on your PC.
Pick one of them and click the button OK.
Here, I have chosen Steem
Engine window, an Atari ST Emulator currently running on
||The Settings window has
been updated :
- The name
of the target window is Steem
- The size
of the Window in pixels is 396x321.
If you want, you can change the default values for Folder Path
(location where the pictures will be created), File Prefix and Suffix Number.
If you leave the parameters as they are, the first picture will be
created in the Folder c:\Temp\Pictures\
and the name will be img_0001.bmp.
You can now click the button OK
to close the Settings
only visible part of the WindowCapture
tool is the Main
You can notice than the button Start is
Make sure the put the target window (here Steem Engine window)
visible. You can put both windows (application &
target) close together.
Click on the button Start
to take your first picture.
can notice that the information within the Main window have
been updated :
- The full
path (folder + file name) of the picture.
- The Size
of the picture (in pixels)
- The number
of color of the picture
The counter has been incremented. So next picture will be named
If you look into the pictures target folder (here c:\Temp\Pictures\),
you should see the picture you have taken few seconds before.
By clicking again on the button Start,
you will take other pictures (img_0002.bmp,
They will be displayed in real time by Windows in the target folder.
No need to go back in the Settings
window if the parameters are OK.
you look carefully to the picture, you will see that WindowCapture have
taken the whole window area, including title bar, menu bar, icon bar...
If you want to capture only the game
part of the window, it is time to read the next chapter of
this documentation !
will take the whole window as final picture :
The first option is to get only the application part of the window,
named Client Area
you can notice, the application Title
bar and most of the window borders
You can ask WindowCapture
to get only the Client
Area of the window by checking the Get Client Area Only
option from the Settings
size of the Client Area
is displayed next to the option check box. The full window size is
396x321, the Client Area part is only 388x294.
you probably want to keep only the Game part of the
window, you will have to remove extra margins
located around the picture : Icon bar + black borders.
can define the Margins
sizes (in Pixels) in the Settings panel.
There are four number to provide (Top,
Bottom, Left and Right) :
real time, you can see what would be the size of the final picture
(here 320x200). Because the Atari ST low resolution is 320x200, we know
we have catch all the screen. You will have probably to do several
tests before finding the right numbers for margins size. Once you got
them, they will remain the same for all games running on the same
emulator. You have to do the job for each emulator you will use. The
easy way is to take a screen shot of the Client Area first,
and, using a Graphic software, compute the margins size in pixels and
put the values in the WindowCapture's
Now that we have the right margins size, the picture taken by WindowCapture fits
with the Game screen size :
Margins size helps you also to capture only a small part of the screen,
for example where the action takes place, ignoring unwanted background.
the characters only move in a small area of the screen (320x63) :
of the machines (computer, console, arcades) of the 80's are running
320x200 graphics. So, on today's computer, we usually ask the emulator
to double the resolution,
to play in a 640x400 window :
defining the right Margins
size, we can get the game area as a 640x400
Beware, the Margins size
are not exactly the double of the 320x200 screen capture session
because some part of the Client
Area (Icon bar) has not been doubled. Only the Screen part
of the emulator has.
you want the picture to go back to its native resolution
(320x200), you may ask WindowCapture
to keep only some of the rows / columns. If the resolution has been
doubled, keep 1 row out of 2. If the resolution has been tripled, keep
1 row out of 3, etc.
You can control the rescaling of the picture using the Keep 1 Row out of X
and the Keep 1 Column
out of X options in the Settings panel :
The size of the final picture (here 320x200) is updated in real time,
regarding the scale values inserted in the fields.
Once saved on disk, the picture is 320x200 :
the Set as Top-Most option
guarantees you that the window you want to capture will stay always
visible (put at the top of other windows). It can be useful to
prohibit any cover of the window by another one while you are recording
a game session.
are two file formats used in WindowCapture
: GIF for
256 or less
pictures and BMP.
We won't save the pictures using JPEG file format because we don't want
quality loss format.
probably the best choice when you are using WindowCapture with
vintage systems emulators. Most of the time, the number of colors on
the screen is less than 256. The GIF pictures have better
compression than BMP so the result files are smaller. If you
have asked GIF
file format and the picture into the window has more than 256 colors,
will save it as BMP
button is used to remove all consecutive duplicated pictures
from the Folder where they have been created. Usually, we run the Clean Folder
process after having recorded an animation (see below), to not keep two
consecutive pictures to be the same. If the recording frequency is high
(> 30 images / seconds) you may have several times the
picture in the target folder.
file name of the picture is build using the File Prefix and a Number, incremented
after every shot. Based on how you define the first value of this
Number, the names of the files will be different.
If you write 1
into the Number
field, the files will be named img_1.bmp,
and so on.
you write 00001
into the Number
field, the files will be named img_00001.bmp,
and so on.
latest format is more convenient to sort a huge number of files into a
setting adds a time/date information at the end of the file name :
Example : img_00001_20121118_215806_06.bmp
This is useful for animation recording, to understand how many
hundreds of seconds separate two sequential pictures.
> Record Animation
of the WindowCapture key feature is the
capability to record pictures on a regular timing. Because most of the
video game system run at maximum 60 frames per seconds, if we get one
picture every each 1/60 sec, we are about sure to get all the animation
steps. This is mandatory to be sure to get all details.
Let's capture the Karateka
middle kick :
we go into details, we find that this kick is composed of 9 frames :
the sprites have been extracted, we drop down to 5 different pictures :
could have capture these pictures clicking as fast as possible on the Start button of the Main window, but
there is a better solution !
You have to check the Set
Auto Frames/sec. option available at the bottom of the Settings panel :
set the number of pictures to capture per second (100 is the maximum,
60 is probably the highest value really useful). If you start with a
high value (between 30 and 60 images / second), several sequential
pictures would probably be the same.
Once back to the Main
window, click on Start
button to start recording the animation as a set of pictures. To stop
the record of the animation, click again on the Stop button. While
recording the pictures, the Counter
indicates how many pictures have already been taken and the Elapsed Time give
you the duration (in seconds and minutes) of the record :
the folder receiving the pictures will be quickly filled with hundreds
of pictures. Make sure your have enough room to store all of them :
the Source code available
Source code is freely available in the Zip file in download section.
It is currently packaged as a Visual
Studio 2010 Project set of files. The tool is only using C Language, so you
can recompile it with any other C ANSI compiler (GCC...) running on
about a Macintosh or Linux release ?
on schedule. The program itself uses Windows API everywhere (user
graphic interface, system calls...) so porting the software to another
platform means rewriting everything.
Another good reason to do not spend too many time on supporting other
platforms is linked to the availability of other systems emulators
(Atari ST, Amiga, Genesys, Arcade...) mainly on PC.
you have any plan to release an Apple IIgs version of KARATEKA
No. This game was
for WindowCapture documentation purpose.
you use WindowCapture to get the screenshots displayed on this page ?
PrintScreen Key rulez !!! We avoid recursivity in
such projects because of the risk of never ending loop.
19 2012 : WindowCapture
8 2012 : WindowCapture
of the button Clean
32 & 64 bits + Source Code