README FOR GENPAL Ver 1.0
---------------------------

GenPal is a utility that will generate the most optimized palette for a 
bitmap with a limited no. of colors available. It generates Delphi Code 
(a .PAS file) which you can include in your project. This file has a 
function called GeneratePalette which returns a Handle to the optimized
palette. You can use this function as follows :

// add this code to your FormCreate or FormActivate Function

var Hpal : HPalette;
begin
     hPal := GeneratePalette;
     Image1.Picture.Bitmap.Palette := hPal;
     Image1.Repaint;
end;

where Image1 is a TImage. 

or call 
	AssignPalette( Image1 ); 


USING GENPAL 
------------

Run GenPal.exe, and select the image (.bmp) in the image file. The output 
file is automatically given the same name as the image file, with the
extension .pas. Select the Maximum colors available in the spin edit, and 
click on Generate. This will give you a file which can be included in 
any project.
	REMEMBER, call DeletePalette in your form's FormDestroy procedure or when
you quit, otherwise you might have memory leaks!

NOTE : You will notice the difference only on systems which have less
than 256 colors, so if you are in high color mode, change your settings
to 256 colors to notice the difference. 

NOTE 2 : In 256 color mode, you can only use 236 colors as 20 colors belong
to the system palette, which consists of the colors given to menus, title
bars etc.

AUTHOR INFO AND SOURCE
----------------------
GenPal Ver. 1.0 has been written by Deepak Shenoy. You can contact me 
at dshenoy@icodeindia.soft.net. My home page is located at 
http://www.geocities.com/Athens/Delphi/9072. 

The usage of this utility is FREE. The source code is available too, but I don't 
know if I should charge for it. Send me a mail if you like the utility and want to 
see the source code, and also tell me if you're willing to pay for it (I'll just 
base the whole thing on your vote!)

Acknowledgements 
----------------
Jeff Prosise, In the October '97 (and August '96) issue of Microsoft Systems Journal, 
had written a wonderful article on the "ultracool Gervautz-Purgathofer octree color quantization 
algorithm" (I have no idea how to pronounce that either :)) GenPal is based on those
articles.


Disclaimer
----------
This application is FREE. And I don't say it's perfect. So you can't blame OR sue
me if it doesn't work, or if something goes wrong. SAVE EVERYTHING BEFORE YOU USE
GENPAL VER 1.0 

Deepak Shenoy 