Sample Gradient plug-in for CCDSoft v5.0.72 or later
Copyright 2002 by Ron Wodaski
http://www.newastro.com
May be re-purposed without permission. Use this sample to build your
own CCDSoft plug-ins. No official technical support available.


Installation
============================================================================
Copy the plug-in DLL (ONLY!) to the following subfolder of the
CCDSoft install location:

C:\Program Files\Software Bisque\CCDSoft Version 5\Image Processing Plug Ins

CCDSoft version 5.0.72 or later will automatically locate the plug-in. When
an image is open, plugs are listed on the Image | Plug Ins menu item. This
plug-in goes by the name of "Remove Gradient Sample Plug-in".


Operation
============================================================================

NOTE: A sample image with a gradient at 45 degrees, amount 200, is included
in the ZIP file. Use it to test gradient removal.

1. Open an image, and choose the plug-in from the Plug Ins menu as described
above.

2. Determine the gradient amount by passing the cursor over the image, and
observing the change in numeric values in the status bar (lower left). The
gradient amount is the difference in brightness from one side of the image 
to the other. Enter this value into the "Gradient amount" text box. You can
also deliberately enter a small gradient value, and click the GO button
multiple times to repeatedly remove a small amount of the gradient at a time.

3. Determine the gradient angle. A left-to-right gradient has an angle of
zero. A vertical gradient has an angle of 90. Values outside this range will
not work. The angle isn't exact; it depends on the shape of the image. For
example, a 45-degree gradient is one that goes exactly from one corner to
another corner. Feel free to modify the code to use actual angles (which
would require more complex math). Also, an undo button is another exercise
left to the reader - it would allow estimating and testing the angle of the 
gradient. 

4. Determine the gradient direction. A postive gradient gets brighter from
left to right/top to bottom. A negative gradient gets brighter from right to
left/bottom to top.

5. Click the GO button to remove the gradient. You can click it more than once
to remove the gradient bit by bit (see step 2 above).

When you are done, click the Done button to close the window.

Ron Wodaski
author of "The New CCD Astronomy"
http://www.newastro.com
