Expanding Sky and preserving foreground

I would like to stretch the Sky of an image without affecting the rest. I tried Seamcarve from gmic. I could not get it to only stretch the sky. Has anyone tried something similar? I attach the image which i would like to expand the sky in. I tried to duplicate the layer and scale it up and then get a gradient between layers. The gradient was still a bit hard and visible. Maybe somebody could help me out here.

This work is licensed under CC BY-NC 4.0

The image is 1337px tall. How many px of sky would you like to add?

Not much. Maximum to a ratio of 4:3. Why does this matter?

It can be done in Darktable’s enlarge canvas module but don’t know about gimp

1 Like

I believe in gimp you’d want to:

  1. Enlarge you canvas to the desired size
  2. Make a selection of the sky to stretch
  3. Resize that selection to fill your canvas
  4. Probably blur/paint in some color as there will likely be some banding or other artifacts.
  • Position a horizontal guide as far down as possible without hitting a mountain (about 18px for me)
  • Select the strip above the guide
  • Scale it up vertically (say, 180px)
  • Move the bottom of the enlarged strip to the guide (you can also use View > Snap to canvas edges to avoid moving laterally).
  • You can make the sky a bit more uniform by making a feathered selection on the sky, and applying spread noise with a large X :

3 Likes

Yeah i tried that. It is very hard to create a mask with such a small sky especially on the left side. But this would be my first choice for other images

Thank you. This could be the solution to my problem. Somehow i get a gradient in the streched layer. And i need to sort out the texture of the streched part of the sky. Will try to fix those two things later

Blur it, smudge it, gmic dream smooth it.

Do you know the plug-in for Gimp ā€œLiquid Rescaleā€? It works similarly to the possibilities as in some previous photoshop versions. In the simplest case, one masks image areas that should remain unchanged and gives a new image size. The non-protected areas are then correspondingly enlarged or extended.

http://liquidrescale.wikidot.com/

I tried it on the above picture. Mountains and lower part completely masked and height set to 1500 pix. Since the sky area is very close at the top, it did not work without even distorting the peaks. But you can also refine the mask.
If there is some more picture information available, in this picture at the sky, it works really well. Just try it out yourself.

For processing in Krita even the baled power of KI would be available, with similar possibilities as in current photoshop. If you wanted to. Since the AI plug-in is specially designed for the purposes of Krita, it could also be usable in the photo area. I hadn’t tried that before.

If not specifically for this picture, then perhaps as a hint for similar work with suitable images :slight_smile:

Thanks you all for your help.
I managed to get the sky how i like it. I scaled the sky portion of the image up and then used Noise and Blur to get the texture right.

1 Like

GIMP, Liquid rescale… 2024-08-26T22:00:00Z
Uploading: 20240810-DSC_9337 Ā· 2000Ɨ1500.jpg…

G’Mic plug-in in GIMP, using ā€œInpaint (Multiscale)ā€ filter under ā€œRepairā€.

The multiscale inpainting filter often works really well also for this kind of task, which is more like ā€œoutpaintingā€. I use it all the time for this…

1 Like