In its simplest form, stretching works as follows. A typical CCD image represents each pixel as a number from 0 to 65,535. This has to be mapped into the video monitor’s range of 0 to 255. A simple formula is applied to each pixel:
Displayed Gray Level = Pixel Value x Scale + Offset
If the resulting new value is greater than 255, it is set to 255. If it is less than zero, it is set to zero. The Scale and Offset numbers control how the image appears on the screen.
Where do these two "magic" numbers come from? The user provides them by trial-and-error. Although MaxIm DL can try to determine the settings for you automatically, the best results are obtained by tweaking the numbers until the most pleasing display appears.
In MaxIm DL, the screen stretch numbers are entered as Minimum and Maximum. A pixel that is at the minimum value is set to zero, and a pixel at the maximum value is set to 255. This method is more convenient because it leads to a simple way to display the stretch numbers graphically using a slider bar, which slider bar appears in the Screen Stretch window.
Instead of entering numbers, it is much faster to use the Quick Stretch facility. This allows you to modify the image appearance with small up/down and left/right movements of the mouse. To do this, hold down the Shift key, then click and drag the mouse on the image.
Whirlpool Galaxy – Two Different Stretches
The problem with stretching is determining exactly how to stretch the image for best effect. Often there are several different possibilities for the same image. For example, two different views of the same image of the Whirlpool Galaxy (M51) are shown above. The first image reveals all the detail in the spiral arms, but the core of the galaxy is burnt out. In the second image the spiral arms are all but gone, but now we can see the supernova adjacent to the core of the galaxy.