Wednesday, 4 June 2025

Gimp workflow for fixing elongated stars Part 2

Gimp workflow for fixing elongated stars Part 2

Click on an image to get a closer view if required.

We shall use the same EQ mounted Seestar S50 data that we used in Part 1.

In Part 1 we saw that elongated stars were distorted back into shape by using Select by Colour, Select > Grow and the Distort filter Value Propagate.

The Value Propagate Distort filter propagates the edges of pixels in various controllable directions as shown by the Value Propagate dialog. This distorts the various objects in the image without changing the size of the image.

More White Propagate



More Black Propagate

It can be seen in these dialogs what is propagated and in what direction.


Gimp workflow Part 2

This workflow is simpler in some ways than the workflow in Part 1.

However we do not select the stars, we work on the entire image.

Part 2 workflow

   Load the image with elongated stars into Gimp (It is best if the image is a 16 bit linear image. It can       be converted in Gimp if required). (Duplicate it because it will be required later.)

   Apply Filters > Distorts > Value Propagate to the image more than once, alternately using More White and More black controlling the direction(s) of propagation each time and finishing with More black. (Probably 2 or 3 applications of Value Propagate will be enough to distort the stars into the correct shapes). Even 1 application of Value Propagate might make the stars round. Later, when the stars are removed they can be added back with less prominence to compensate for their increased brightness.

    Of course everything in the image will have been slightly distorted but that doesn't matter

    Remove the stars from the original image using Starnet++


Here we are going to use the command-line version of Starnet++ but using a small Python program and an IDE called Thonny to control it and make its use simpler.

We have tested this in Windows and in Linux and they both work identically and perfectly.

First it is necessary to download and extract the Starnet++ command line software for either Windows or Linux as required. We have extracted it to the Desktop in both cases. You do the same, you can always put it somewhere else at a later date if required.

It can be downloaded from https://www.starnetastro.com/download/

Then it is necessary to download the Python IDE Thonny for the appropriate operating system.

Follow the download link from https://thonny.org/  download and install Thonny.

Copy the following script into a text editor and save it as Starnet-plus-plus.py into the Starnet++ folder on your desktop



import subprocess

# Ask user for the input filename

input_file = input("Enter the input image filename (must be a 16-bit TIF without an alpha channel): ")

# Ask user for the output filename

output_file = input("Enter the Output image filename: ")

# Run StarNet++ command

subprocess.run(["./starnet++", input_file, output_file])

print(f"Processing complete. Output saved as {output_file}.")


There are some test data that you can practice on in the Starnet++ folder on your desktop this folder. This is where your 16 bit .tiff image to have its stars removed needs to be placed. It is also where the resulting starless image will be placed. In this example we placed our 16 bit .tiff image. Open the Starnet++ folder and right-click on Starnet-plus-plus.py and select Open With Thonny.


This will launch the Thonny IDE with Starnet-plus-plus.py open in it.

Linux Version



Windows Version

The Linux and the Windows version look essentially the same and they both have the green triangle RUN button at the top of the Thonny window.

Clicking on the Run button will run the program and the user is asked to enter the 16 bit .tiff filename (the file must already have been placed in the Starnet++ folder)

When the input filename has been entered and Enter has been pressed the user is asked to enter the filename required for the starless image. Any filename such as starless.tiff could be used.

As in 3) above, pass into the program the Original image with the elongated stars, which will have the stars removed and just contain the original nebula.

Start of the Thonny run


Finish of the Thonny run



The starless original image processed to the user's requirements Image A


Distorting the original starry image to correct the stars

Part of the original starry image with elongated stars


First Value Propagate Distort


Second Value Propagate Distort


Preparing stars to add back to the starless image

Remember that the stars that were removed from the original image were elongated.

Image with stars fixed (Image B)



Image B with stars removed (Image C)




Image C subtracted from Image B as layers and flattened, producing an image of the stars (Image D)



Image D is then added as a layer to Image A and flattened, producing an image with the original nebulosity and the repaired stars. Before the image was flattened and Image D was the top layer, curves was applied to the top layer to slightly reduce the prominence of the stars in the final image.

Final image of M16 


The stars have been considerably improved by this process and we are satisfied with the result.

We have used a Python program running in a Thonny IDE as an adjunct to the Starnet++ command-line program to make the use of it simpler. However, of course, depending on the environment in which you are working, Starnet++ could have been used as a Gimp plugin (but not for Gimp 3 at the time of writing) or as a Siril plugin. It is my practice to use discrete programs to do discrete processes such as GraXpert to extract backgrounds and denoise and Siril to photometrically correct images. In this way, the command line Starnet++ fitted in well.