Gimp-Forum.net
Make a freehand selection of a segment within one path - 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: Make a freehand selection of a segment within one path (/Thread-Make-a-freehand-selection-of-a-segment-within-one-path)

Pages: 1 2


Make a freehand selection of a segment within one path - J-G1 - 03-10-2021

Hi all,

For one of my projects I would like to extract a specific part of a path, and make it a separate path to move around by itself. I have included some screenshots and the corresponding xcf file in the attachments.

One method I have already tried is with using the the ofn-path-edits.zip, to break apart all paths, and toggle the lock button and then move them around. This works, however; in my actual projects, I'm dealing with several hundred segments, all merged into one path. If I have totally break this down and, locate the right segments, toggle the ones I want to use, and then start moving them around, this is extremely time consuming.

My question;

is there a way to make a selection of a segment of a path (with some sort of free-hand tool?) to extract a specific part of a path, and make it a path by itself?
(pls see attachment for clarification).

Any help will be greatly appreciated!
Warm regards,

J-G1


RE: Make a freehand selection of a segment within one path - Krikor - 03-10-2021

J-G1,

This plug-in may be useful for you:
https://www.gimp-forum.net/Thread-Cropping-and-slicing-a-path


RE: Make a freehand selection of a segment within one path - Ofnuts - 03-10-2021

With ofn-path-edits, you can duplicate the path, and extract the strokes that are in the selection. You can also duplicate the path and delete the strokes in the selection. After that you have your two path parts...


RE: Make a freehand selection of a segment within one path - J-G1 - 03-10-2021

(03-10-2021, 04:20 PM)Krikor Wrote: J-G1,

This plug-in may be useful for you:
https://www.gimp-forum.net/Thread-Cropping-and-slicing-a-path

Hi Krikor,

Thank you for notifying me of this plug-in. It am indeed able to extract parts of my path as I want using the convex polygon method!

Much appreciated!


RE: Make a freehand selection of a segment within one path - Krikor - 03-10-2021

J-G1,

The solution provided by Ofnuts is more practical, with just one selection you can get the desired result.

Using the  ofn-path-edits plug-in in:

Edit-Extract-Strokes and 
Edit-Delet-Strokes

(03-10-2021, 05:38 PM)Ofnuts Wrote: With ofn-path-edits, you can duplicate the path, and extract the strokes that are in the selection. You can also duplicate the path and delete the strokes in the selection. After that you have your two path parts...

[attachment=5712]


RE: Make a freehand selection of a segment within one path - J-G1 - 03-10-2021

(03-10-2021, 05:38 PM)Ofnuts Wrote: With ofn-path-edits, you can duplicate the path, and extract the strokes that are in the selection. You can also duplicate the path and delete the strokes in the selection. After that you have your two path parts...

Hi Ofnuts,

Great, this has sorted out what I needed to do in the most convenient manner.
Thanks a lot, much appreciated!

(03-10-2021, 07:10 PM)Krikor Wrote: J-G1,

The solution provided by Ofnuts is more practical, with just one selection you can get the desired result.

Using the  ofn-path-edits plug-in in:

Edit-Extract-Strokes and 
Edit-Delet-Strokes

(03-10-2021, 05:38 PM)Ofnuts Wrote: With ofn-path-edits, you can duplicate the path, and extract the strokes that are in the selection. You can also duplicate the path and delete the strokes in the selection. After that you have your two path parts...

Hi Krikor,

Thanks for getting back to me with the extended explanation. Indeed, this is exactly what I was looking for.

Much appreciated!
Kind regards,
J-G1



RE: Make a freehand selection of a segment within one path - J-G1 - 03-12-2021

(03-10-2021, 07:10 PM)Krikor Wrote: J-G1,

The solution provided by Ofnuts is more practical, with just one selection you can get the desired result.

Using the  ofn-path-edits plug-in in:

Edit-Extract-Strokes and 
Edit-Delet-Strokes

(03-10-2021, 05:38 PM)Ofnuts Wrote: With ofn-path-edits, you can duplicate the path, and extract the strokes that are in the selection. You can also duplicate the path and delete the strokes in the selection. After that you have your two path parts...


Dear Krikor, dear Ofnuts,

I stumbled upon the following issue while working with ofn-path-edit plugin;

As soon as I start extracting (same with deleting) a chunk of my path, the size of the file ramps up like crazy. The initial file size for the path/file which I'm trying to modify, is 160 mb. After deleting 90% of my path (or extracting 10%), the file size grows upwards of 10 GB..
This seems excessive, since if I copy the path, and then extract a significant chunk of it.. this should not increase my file size with any more than the original 160 mb.. right?

In this manner, I won't be able to use the plug-in after all...

Any thoughts?
Warm regards,
J-G1



RE: Make a freehand selection of a segment within one path - rich2005 - 03-12-2021

That is normal: It is the size of the image in memory and includes all the undo 'saves' and any additional layers, channels, etc.

Example: I start off with a file on disk - a Gimp .xcf with a path. size 15,874 KB
Open in Gimp before any editing 3.4 MB in memory. I duplicate the path for splitting, now 3.6 MB. Do all the selecting applying path edits on both paths size now 11 MB.
...but when I come to save it back to disk the file size is 16,876 KB. Small increase due to the extra duplicated path.

There is a setting in Edit -> Preferences -> System Resources for undo levels, default is 5 You could maybe reduce that, might make a difference (not too sure it does) There is also a dock Windows -> Dockable Dialogues -> Undo History does what it says, will reduce that size in memory.


RE: Make a freehand selection of a segment within one path - J-G1 - 03-12-2021

(03-12-2021, 12:13 PM)rich2005 Wrote: That is normal: It is the size of the image in memory and includes all the undo 'saves' and any additional layers, channels,  etc.

Example: I start off with a file on disk - a Gimp .xcf with a path. size 15,874 KB
Open in Gimp before any editing 3.4 MB in memory. I duplicate the path for splitting, now 3.6 MB. Do all the selecting applying path edits on both paths size now 11 MB.
...but when I come to save it back to disk the file size is 16,876 KB. Small increase due to the extra duplicated path.

There is a setting in Edit -> Preferences -> System Resources for undo levels, default is 5 You could maybe reduce that, might make a difference (not too sure it does)  There is also a dock Windows -> Dockable Dialogues -> Undo History does what it says, will reduce that size in memory.

Hi rich2005, thank you for explaining.

Probably my bulk-action is requiring to much processing power from my mediocre laptop..
Will divide the workload in chunks.

Thank you for getting back to me, much appreciated!

JG-1


RE: Make a freehand selection of a segment within one path - Ofnuts - 03-13-2021

(03-12-2021, 01:08 PM)J-G1 Wrote: Probably my bulk-action is requiring to much processing power from my mediocre laptop..
Will divide the workload in chunks.

Looks like a bug in Gimp/ofn-path-edits. It looks like there is an underlying undo step created for every operation (one per stroke deleted...), and since you have a big path and many strokes this grows fast. Not that easy to fix, but stay tuned.