Making your own Pacman icons
----------------------------

To do a screen capture of the online Pacman:
(This works for Windows only.  For Macs,
you will have to get help from Mike.)

Run the online FlashPacman program at
http://www.thepcmanwebsite.com/media/pacman_flash/
When the screen gets to something you want,
hit Alt-Print Screen.  This puts the screen on
the clipboard.  You can now paste it into
Paint, crop it, and save as a .gif.

To make the icon you want:

Using Paint or some other image editing
program, make a .gif image consisting
of a small box containing the desired icon
on a black background.

Put this image, say it is called xyz.gif,
in a directory with Icons.class.  
Navigate to this directory and type

java Icons xyz

This should produce 4 files:

xyz-red.txt
xyz-green.txt
xyz-blue.txt
xyz.png

In most cases xyz.png will be the image
you want, and you won't need the .txt files.

What the program does is:
1. reads in the .gif file
2. produces the .txt files from the 
red, green, and blue components of the .gif,
3. tries to find a box exactly containing
the image and crops it to that box,
4. resizes to 40 x 40 and makes all black
pixels transparent,
5. writes this icon out to xyz.png.

If the icon is roughly square, and you want it
to be 40 x 40, and it is completely surrounded
by black, this will do the right thing.
Otherwise you will have to tweak it.  If it
is not square or you don't like the bounding
box it computes, you can specify the bounding
box (xMin, xMax, yMin, yMax) on the command
line after the filename.  You can look at the
.txt files to help you find the right bounding
box.  The row and column numbers are given along
the top and left side.  




