I often use MaxIM DL to process my astro photos and perform nonlinear stretches using DDP, Curves and other procedures.

I wanted to find out if I could replicate MaxIM DL’s stretching functionality in GIMP, to better understand what MaxIM DL does.

I started out with four FITS files of the Lagoon Nebula (Messier 8), one for each color of LRGB, exposed at 50 seconds each. I aligned and stacked the image and saved as TIFF – so no stretching at all in MaxIM DL.

This is the image MaxIM DL produced:

As you can see, there’s hardly any detail in the image and it is badly underexposed even though the FITS data is actually of very good quality.

After stretching in GIMP, I ended up with this image:

This image has a lot more detail in it along with color information. Note that the stars in this image have the Panda Eye effect because I resized the original image to fit in this article – the original image is over 6Mb in size and the image here is just 642Kb – about 10% of the original so a fair bit of information has been lost in the resizing process. In addition, the resizing process sharpened the image quite a bit, which results in the Panda Eye effect around stars.

Learn How To Take Great Astro Photos

Learn how to take great astro photos using remote telescopes located around the world! It’s fun, easy, and there’s a whole community of astronomers just like you to interact with.

Check out my FREE book for more details! You can download the book right away and start taking your own images like this.

Performing A NonlinearStretch

Start by opening the image in GIMP – you can use the one from this article if you don’t have one on hand.

1. Choose Colors – Levels from the menu

2. Locate the middle pointer on the graph, as shown:

3. Move the middle pointer left toward the beginning of the graph as shown:

4/ Click Ok to commit the change

5. Choose Colors – Levels from the menu

6. Locate the left pointer on the graph, as shown:

7. Move the pointer to the right to the beginning of the graph as shown:

8. Click Ok to commit the change

9. Perform another Levels adjustment and modify the marker on the left as shown:

10. Perform a Hue/Coma adjustment. Select Colors – Hue/Coma from the menu and fill in or select as shown:

Perform a Curves adjustment to add some more color to the nebula. Choose Colors – Curves from the menu. Edit the individual color channels, in this case, I am editing the red channel, to add color depth to the image:

Perform a final levels adjustment, bringing in the left and right markers to the beginning and ends of the histogram graph, as shown:

You have completed the simple stretch process.

Note that I had you use a Levels adjustment in just about all cases because a Levels adjustment is easier to demonstrate as opposed to a Curves adjustment. You can certainly use a Curves adjustment in place of a Levels adjustment just about anywhere in this article; however, you’ll have to edit a number of points along the curve to get it right. The Levels adjustment is much easier to work with.

Conclusion

In this article, I showed you how to perform a nonlinear stretch on an image. The stretch process produced excellent results from an unstretched image. You can use similar approaches for your own image processing. Keep in mind that you want to make small changes over several levels adjustments as opposed to making big adjustments in a few Levels adjustments.