Gimp-Forum.net
Stretch part of image at angle? - Printable Version

+- Gimp-Forum.net (https://www.gimp-forum.net)
+-- Forum: GIMP (https://www.gimp-forum.net/Forum-GIMP)
+--- Forum: General questions (https://www.gimp-forum.net/Forum-General-questions)
+--- Thread: Stretch part of image at angle? (/Thread-Stretch-part-of-image-at-angle)

Pages: 1 2


Stretch part of image at angle? - c4cc - 08-19-2023

Credit to @PixLab for teaching me Liquid Rescale, as per his tutorial:

https://www.youtube.com/watch?v=WFT1cnZomLM

Now, how do I use Liquid rescale (or any easier alternative methods) to stretch image sections at an angle? Here, I'd like to stretch this character's lower torso as shown out longer, but without messing up the image in any way.

https://ibb.co/WWyz3z1


RE: Stretch part of image at angle? - PixLab - 08-20-2023

(08-19-2023, 05:01 PM)c4cc Wrote: Now, how do I use Liquid rescale (or any easier alternative methods) to stretch image sections at an angle?

Don't!
LR is good horizontally or vertically, unless you like horrors, I would not even try diagonally Wink

Rotate 25 degrees with the rotate tool
[attachment=10234]

Then copy 3 parts with the free select tool
[attachment=10235]

You should come with something like that
[attachment=10236]

Then stretch the part VERTICALY only of the layer you need to stretch AND adjust/move up the other layer
[attachment=10237]

Then link or merge the layers AND rotate back by -25 degrees (minus 25) to get back at the original plan
[attachment=10238]


Result
[attachment=10239]

Then > You will just need to reinforce the blacks (black lines) to get back the sharpness, as those rotation are a bit destructive...
Filters > Enhance > Sharpen (Unsharp Mask), default setting should be good enough
or if you're a bit more advanced > duplicate your final product and do a high pass > Filters > Enhance > High Pass... on the duplicated above and put that layer in Soft light mode


RE: Stretch part of image at angle? - c4cc - 08-20-2023

(08-20-2023, 03:20 AM)PixLab Wrote:
(08-19-2023, 05:01 PM)c4cc Wrote: Now, how do I use Liquid rescale (or any easier alternative methods) to stretch image sections at an angle?

Don't!
LR is good horizontally or vertically, unless you like horrors, I would not even try diagonally Wink

Rotate 25 degrees with the rotate tool


Then copy 3 parts with the free select tool


You should come with something like that


Then stretch the part VERTICALY only of the layer you need to stretch AND adjust/move up the other layer


Then link or merge the layers AND rotate back by -25 degrees (minus 25) to get back at the original plan



Result


Then > You will just need to reinforce the blacks (black lines) to get back the sharpness, as those rotation are a bit destructive...
Filters > Enhance > Sharpen (Unsharp Mask), default setting should be good enough
or if you're a bit more advanced > duplicate your final product and do a high pass > Filters > Enhance > High Pass... on the duplicated above and put that layer in Soft light mode
Thanks for this, I'll try this soon and let ya know the result


RE: Stretch part of image at angle? - PixLab - 08-22-2023

(08-21-2023, 07:26 PM)c4cc Wrote: Sadly, at the vertically stretch and moving other layer up part, I ended up with this: https://ibb.co/F8yBtVs, seems like the problem with stretching is that it messes up image as a whole. Any tips on stretching the desired part without messing up image?

It seems that you stretched the wrong layer, not the part of the bottom bully/top skirt, also it looks like you did not "cut-out" that part, but I can't see well on your screenshot as the thumbnails are too small
Can you make your layers in the layers' stack bigger?
If you don't know how to, click on that little button while the layers' dialog is selected (see screenshot),
A context menu will open go to Preview size and chose Enormous or Gigantic,
then post a screenshot of your layers' dialog here

[attachment=10243]

Result In Gigantic preview mode

[attachment=10244]

When I did it, if I recall correctly... I did stretch downward only (the middle node at the bottom), then I overlap the layer "legs", adjust with the move tool using ONLY arrow keys, and it fitted just perfectly


RE: Stretch part of image at angle? - rich2005 - 08-22-2023

Well.... liquid rescale is a process known as seam-carving. Paths of pixels to remove or add are formed by zig-zag paths top of image to bottom of image.

Instead of trying to use the image as-is why not rotate it to make the section concerned more vertical.

It might go like this, 
Use the measure tool to rotate. (there are other rotate tools, up to you what you use)
Use liquid-resale sparingly and if required use it more than once.
Rotate back to original.
Very rarely is the result perfect, always something to fix-up Wink 

Five minute video: https://youtu.be/jIsbAO3-yVM

This was a 500 pix stretch - 200 pix then another 300 pix.

[attachment=10245]


RE: Stretch part of image at angle? - denzjos - 08-22-2023

What I did :
- select a part from the drawing to be transformed en paste it a new layer
- select a part on the bottom side of the drawing to fit with the enlarged part afterwards  
- draw a rechtangle path
- rotate, scale and position the rectangle to the part to be transformed (by scaling, keep the aspect ratio) 
- use the path tool to remove the upper line of the rectangle
- make a copy of the rectangle
- move the rectangle down with the sides on the same place of the original path
- enlarge the sides of the rectangle to the top sides of the original rectangle
- make a selection of the drawing with the first rectangle (selection from path)
- copy that part to a new layer and select that layer 
- use : filters / distorts /  Perspective transform / Perspective transform 4 points to 4 points
- select a part on the bottom side of the orinal drawing, copy it to a new layer and move it to fit with the enlarged part
Done
[attachment=10246]
[attachment=10247]


RE: Stretch part of image at angle? - c4cc - 08-22-2023

(08-22-2023, 09:42 AM)rich2005 Wrote: Well.... liquid rescale is a process known as seam-carving. Paths of pixels to remove or add are formed by zig-zag paths top of image to bottom of image.

Instead of trying to use the image as-is why not rotate it to make the section concerned more vertical.

It might go like this, 
Use the measure tool to rotate. (there are other rotate tools, up to you what you use)
Use liquid-resale sparingly and if required use it more than once.
Rotate back to original.
Very rarely is the result perfect, always something to fix-up Wink 

Five minute video: https://youtu.be/jIsbAO3-yVM

This was a 500 pix stretch - 200 pix then another 300 pix.
Thanks for this, while it did work, my new picis sadly blur compared to the original which was sharper in comparison. How do I get the newly edited pic to be as sharp and as clear as original?


RE: Stretch part of image at angle? - rich2005 - 08-22-2023

Quote:Thanks for this, while it did work, my new picis sadly blur compared to the original which was sharper in comparison. How do I get the newly edited pic to be as sharp and as clear as original?

Ah..such is life. Any sort of bitmap image translation - scale - rotate - skew - etc can degrade an image. Use one of the other methods that involve splitting up the original, moving apart and super-imposing the edited section in.


RE: Stretch part of image at angle? - c4cc - 08-22-2023

(08-22-2023, 02:31 AM)PixLab Wrote:
(08-21-2023, 07:26 PM)c4cc Wrote: Sadly, at the vertically stretch and moving other layer up part, I ended up with this: https://ibb.co/F8yBtVs, seems like the problem with stretching is that it messes up image as a whole. Any tips on stretching the desired part without messing up image?

It seems that you stretched the wrong layer, not the part of the bottom bully/top skirt, also it looks like you did not "cut-out" that part, but I can't see well on your screenshot as the thumbnails are too small
Can you make your layers in the layers' stack bigger?
If you don't know how to, click on that little button while the layers' dialog is selected (see screenshot),
A context menu will open go to Preview size and chose Enormous or Gigantic,
then post a screenshot of your layers' dialog here



Result In Gigantic preview mode



When I did it, if I recall correctly... I did stretch downward only (the middle node at the bottom), then I overlap the layer "legs", adjust with the move tool using ONLY arrow keys, and it fitted just perfectly

https://ibb.co/c8NrwMN I can't increase layer size

(08-20-2023, 03:20 AM)PixLab Wrote:
(08-19-2023, 05:01 PM)c4cc Wrote: Now, how do I use Liquid rescale (or any easier alternative methods) to stretch image sections at an angle?

Don't!
LR is good horizontally or vertically, unless you like horrors, I would not even try diagonally Wink

Rotate 25 degrees with the rotate tool


Then copy 3 parts with the free select tool


You should come with something like that


Then stretch the part VERTICALY only of the layer you need to stretch AND adjust/move up the other layer


Then link or merge the layers AND rotate back by -25 degrees (minus 25) to get back at the original plan



Result


Then > You will just need to reinforce the blacks (black lines) to get back the sharpness, as those rotation are a bit destructive...
Filters > Enhance > Sharpen (Unsharp Mask), default setting should be good enough
or if you're a bit more advanced > duplicate your final product and do a high pass > Filters > Enhance > High Pass... on the duplicated above and put that layer in Soft light mode
I followed this, especially the and this is the result.

Sadly, the resolution is somewhat low? Or do I combine the high pass layer with the Sharpen (unsharp mask )layer?


RE: Stretch part of image at angle? - PixLab - 08-23-2023

(08-22-2023, 08:20 PM)c4cc Wrote: https://ibb.co/c8NrwMN I can't increase layer size


YES YOU CAN, just look further or move the window to the left

[attachment=10249]


(08-22-2023, 08:20 PM)c4cc Wrote: Sadly, the resolution is somewhat low? Or do I combine the high pass layer with the Sharpen (unsharp mask )layer?

I'll quote rich2005 as it seems you did not read its post Wink
"Ah..such is life. Any sort of bitmap image translation - scale - rotate - skew - etc can degrade an image."

Let's try to sharpen that anime, go to Filters > G'MIC_Qt, a window opens, in the top search field input "sharpen", and try one of those 3 in the G'MIC plugin, default setting should be OK

[attachment=10250]

If you don't have G'MIC plugin in GIMP, get it there > https://gmic.eu