Gimp-Forum.net
Slicing by guidelines actually on an image - 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: Slicing by guidelines actually on an image (/Thread-Slicing-by-guidelines-actually-on-an-image)



Slicing by guidelines actually on an image - johnfaig - 12-08-2021

I have been using Image | Slice using Guides and like it very much.  I am wondering if there is a way to slide an image if the guidelines are actually part of the image.  My thought is to have a mail merge that creates "pages" of smaller images that are separated by very identifiable lines, such as think, red dashed lines.


RE: Slicing by guidelines actually on an image - Redraw - 12-08-2021

I hope I'm on the same idea, I could be wrong so my attempt

You got the image open use the free select tool (F)
started near a corner left click > press select on keyboard (Keep pressing) move mouse to locations still pressing select button move and click mouse until you finish back near starting point

you now will have the making of a grid over the image

> release select button mouse click on yellow dot to finish loop
> right click use 3rd option down > select > to path
> open path dialog tooltab > right click on the path you made use the stroke path option

>options chosen Capimage_0233.png
edit later
> stroke with the paint tool left click stroke
> sounds obvious but remember to use a contrasting color (heh heh that's I will tell you)
>ctrl+shift+A = removes the path guide lines
> drop down and across the guide lines for slicing > sliced and done

> Capimage_1000.png
edit  will later have links
With the screenshot images could not post was going to go to something like ImageBam  or similar  next year might have to go there today.

I hope this helps you.
 Noel


RE: Slicing by guidelines actually on an image - Redraw - 12-09-2021

Having thought yep that will work here is a different way
Got your image open select paintbrush tool with brush 'block 01'
> goto tool options (experiment what looks best) tool options adjust size and adjust spacing
> click just outside the image then click again hold down shiftkey goto where end of line is tobe and just outside image release left mouse
> to get your lines correct for the guides look at the bottom left corner that has the co-ordinates
> drag down and across the guide lines > sliced > Export as

that's another way, with gimp there's always another way

I hope this helps you.
Noel

edit for sharper cleaner (it's an antialiasing thing going on) looking lines try the pencil also different brushes, whit time and enthusiasm experiment, Enjoy the Gimp.


RE: Slicing by guidelines actually on an image - rich2005 - 12-09-2021

Probably not practical, too many caveats depending on image and the nature of the dotted line.

Providing image does not contain too much of the line colour, the dotted line spacing is not too great and a little of the image lost Wink

Using this plugin  ofn-extract-objects.py see  http://sourceforge.net/projects/gimp-tools/files/scripts/ look for  ofn-extract-objects.zip dated 2020-09-13

Give the image an alpha channel for transparency Layer -> Transparency -> Add Alpha Channel
Color select the dotted line
Grow the selection by an amount to join up the selection
Cut the selection Edit -> Cut
Kill the selection Select -> None
Apply the plugin Layer -> Extract Objects

example of that https://i.imgur.com/sj0tsKX.mp4


RE: Slicing by guidelines actually on an image - PixLab - 12-09-2021

(12-08-2021, 04:41 PM)johnfaig Wrote: I have been using Image | Slice using Guides and like it very much.  I am wondering if there is a way to slide an image if the guidelines are actually part of the image.  My thought is to have a mail merge that creates "pages" of smaller images that are separated by very identifiable lines, such as think, red dashed lines.

So I started to do it manually, with Filters ➤ Render ➤ Pattern ➤ Grid... or with G'MIC ➤ Arrays & Tiles ➤ Tiled Isolation and few other G'MIC tools...
Then when I wanted to selection to guides (5 rows x 5 column) to be able to do Slice using guides
I have a script from http://gimpchat.com/viewtopic.php?f=11&t=19515#p266574 installed which allows me to make a grid with guides, but.... in the end...

Anyway to make it short I did found a script I was searching for and might help you
[attachment=7214]

There are 3 scripts inside (2 .scm and 1 .py) you can use only the 2 .scm if you wish, put them in your script folder/directory (the .py should go in the plugin directory, if you want to try it and will be in the menu Image ➤ Guides ➤ Guide to Path(with crossing nodes)

Once the script/plugin in their respective folders/directorythen restart gimp
open your image
then Image ➤ Guides ➤ Setup a Grid with Guides
[attachment=7215]

Once it's done Image ➤ Guides ➤ Guide to Path You will feel that nothing is happened but in the Path dialog you got your paths Wink
Then Edit ➤ Stroke Path Chose how you will stroke the paths (you Foreground color should already be with the wished color)
[attachment=7216]

result
[attachment=7217]

Then you can do as you do usually Image ➤ Slice Using Guides
result
[attachment=7218]


RE: Slicing by guidelines actually on an image - Redraw - 12-09-2021

PixLab (my way lot slower) you finding and sharing the scripts takes my carefully placing guidlines quicker and accurate,
Thank You.
noel
yeah I'm not the op I just appreciate this site !


RE: Slicing by guidelines actually on an image - PixLab - 12-10-2021

(12-09-2021, 10:04 PM)Redraw Wrote: PixLab (my way lot slower) you finding and sharing the scripts takes my carefully placing guidlines quicker and accurate,
Thank You.
noel
yeah I'm not the op I just appreciate this site  !
I'm always glad to know my post helped some one Wink


RE: Slicing by guidelines actually on an image - rich2005 - 12-10-2021

Must have mis-read the post, I thought the red-dotted lines were in place of guides not the place to position guides. How difficult is it to drag guides into place ? (rhetorical)

Just for info: The measure tool can place guides see: https://docs.gimp.org/2.10/en/gimp-tool-measure.html in the key modifier section.

Goes like this: https://i.imgur.com/n9037Bk.mp4

Once you get the idea, it can be very quick.