I use Photoshop, created a duplicate layer then used a layer mask to stretch the background without stretching the moon.
This is done essentially the same way in GIMP. It's a 2-layer operation, easier to do than to describe.
Open the image as your background layer and duplicate it as a second layer, then right-click on the top (duplicate) layer to bring up the "Edit Layer Attributes" menu. "Add Layer Mask" will be a bit below the middle of that menu. Clicking it will bring up the "Add Layer Mask" menu. Choose Black (fully transparent). A black rectangle with a white border will then appear as a thumbnail to right of the image thumbnail of the top layer in the pallet. At this point, the mask is making your top layer fully transparent, and what you're seeing is the bottom layer showing through it. The white outline indicates that the mask is active, so that any change on that layer will change the mask, rather than the image.
With the mask still active (white outlined on the thumbnail in the layers pallet) but not showing, select the moon on the top image layer, and Use "Edit> Fill" to fill it with white. You'll see the white disk appear on the mask thumbnail to the right, but won't see it change the image. At this point, however, the moon you're now seeing is on the top layer, but the star field behind it is from your bottom layer. Now you can switch to the bottom layer, and use adjustments of your choice (curves, most likely) to bring out the stars without affecting the moon on the top layer.
If you're very careful, you could do this on a single layer without a mask, just by selecting the lunar disk on an image layer, and using "Select>Invert," which will select everything in the image except what you originally selected. Using Curves or other adjustments will then affect only the selected area, and you would probably want to feather the selection a bit to avoid an abrupt transition. This method is a bit less versatile in terms of the adjustments, but it will work.
Edited by Messierthanwhat, 13 June 2025 - 09:17 AM.