Re: [Gimp-user] Fit Canvas to Path
On Fri, Nov 6, 2015, at 06:31 PM, Ofnuts wrote: > On 06/11/15 20:58, akovia wrote: > > Would it be possible to script this in any way? Seems like it should be > > a feature already as I keep looking for it but no matter how many times > > I check, it never appears. :P > > > > -- > >akovia > > Stroke the path with a 1px brush and autocrop the image > > Without stroking it could be slow because you have to follow the path > pixel by pixel and keep min/max coordinates. To do it a lot faster you > can instead keep the min/max coordinates of anchors and handles but if > this guarantees that you get a rectangle that contains the path, in the > general case it won't be the tightest fit. > ___ > gimp-user-list mailing list > List address:gimp-user-list@gnome.org > List membership: https://mail.gnome.org/mailman/listinfo/gimp-user-list > List archives: https://mail.gnome.org/archives/gimp-user-list Thanks for the reply Ofnuts, What I was looking for was to expand the canvas to accommodate a path. The inverse is easy as I just load path to selection and then crop to selection. It has always seemed instantaneous to me. I trace out elements in a picture and continue my path outside the canvas to restore elements that were either cropped off or were never there. I end up with a path that goes beyond the bounds of the canvas and have to just take a stab of how big to enlarge the canvas to make it fit. I usually just go overboard and use the technique I described above, but I do it enough that a function to expand/fit canvas to path would be extremely helpful. I'm guessing this just isn't possible with a script/plugin at this point. -- akovia ___ gimp-user-list mailing list List address:gimp-user-list@gnome.org List membership: https://mail.gnome.org/mailman/listinfo/gimp-user-list List archives: https://mail.gnome.org/archives/gimp-user-list
Re: [Gimp-user] Fit Canvas to Path (akovia)
From: akovia> What I was looking for was to expand the canvas to accommodate a path. > The inverse is easy as I just load path to selection and then crop to > selection. It has always seemed instantaneous to me. 1) Enlarge canvas to 300 %, center original canvas 2) Select path 3) crop to selection ___ gimp-user-list mailing list List address:gimp-user-list@gnome.org List membership: https://mail.gnome.org/mailman/listinfo/gimp-user-list List archives: https://mail.gnome.org/archives/gimp-user-list
Re: [Gimp-user] Fit Canvas to Path
On 07/11/15 12:40, akovia wrote: On Fri, Nov 6, 2015, at 06:31 PM, Ofnuts wrote: On 06/11/15 20:58, akovia wrote: Would it be possible to script this in any way? Seems like it should be a feature already as I keep looking for it but no matter how many times I check, it never appears. :P -- akovia Stroke the path with a 1px brush and autocrop the image Without stroking it could be slow because you have to follow the path pixel by pixel and keep min/max coordinates. To do it a lot faster you can instead keep the min/max coordinates of anchors and handles but if this guarantees that you get a rectangle that contains the path, in the general case it won't be the tightest fit. ___ Thanks for the reply Ofnuts, What I was looking for was to expand the canvas to accommodate a path. The inverse is easy as I just load path to selection and then crop to selection. It has always seemed instantaneous to me. I trace out elements in a picture and continue my path outside the canvas to restore elements that were either cropped off or were never there. I end up with a path that goes beyond the bounds of the canvas and have to just take a stab of how big to enlarge the canvas to make it fit. I usually just go overboard and use the technique I described above, but I do it enough that a function to expand/fit canvas to path would be extremely helpful. I'm guessing this just isn't possible with a script/plugin at this point. OK, see ofn-fit-canvas-to-path on https://sourceforge.net/projects/gimp-path-tools/files/scripts/ Actually a mix of Bodo's ideas and mine. First compute a rough bounding box using path coordinates, resize the canvas to this, then crop using a selection on the path for a tighter fit. If you want to be able to add a margin just ask. ___ gimp-user-list mailing list List address:gimp-user-list@gnome.org List membership: https://mail.gnome.org/mailman/listinfo/gimp-user-list List archives: https://mail.gnome.org/archives/gimp-user-list
[Gimp-user] Bizarre Selection-Filling Issue
I'm attempting to manually colour a previously black-and-white image with Gimp. Several sporadic many hours (over the course of a few months) I'm nearly done, and wanted to re-shade the hair. I take my previous hair-shade layer, do Alpha To Selection to select all of it, make a new transparent layer, and with the Free Selection tool, add in more to the selection. All seems good until I attempt to colour it! The layer is transparent, and I was using Brush tool set to a shade of grey, and while grey shows up...not all the time, and sometimes outside the borders. (Screenshot 1; my attempt to colour in the selection. On the left is the Selection Editor, to make sure Gimp actually knows the selection is there.) Essentially, Gimp is attempting to shade in the new layer just like the old one. I've tried this before, and have never had this issue, so I'm not sure what's wrong with it. (Making new layers, applying masks, deleting the old shading layer, etc. didn't fix this problem. Additionally, in the Selection Editor screen, I can click the button to draw along the edge of the selection, and that works perfectly fine.) - Gimp Version 2.8.4; Windows 8.1 64-bit I don't recall fiddling with settings, but I'll assume something isn't default. Attachments: * http://www.gimpusers.com/system/attachments/228/original/Screenshot_(82).png -- Shiizumi (via www.gimpusers.com/forums) ___ gimp-user-list mailing list List address:gimp-user-list@gnome.org List membership: https://mail.gnome.org/mailman/listinfo/gimp-user-list List archives: https://mail.gnome.org/archives/gimp-user-list
[Gimp-user] Bizarre Selection-Filling Issue
Ahhh, never mind figured it out. Was some minor layer order issues mixed in with some older applied mask. Whups. -- Shiizumi (via www.gimpusers.com/forums) ___ gimp-user-list mailing list List address:gimp-user-list@gnome.org List membership: https://mail.gnome.org/mailman/listinfo/gimp-user-list List archives: https://mail.gnome.org/archives/gimp-user-list
Re: [Gimp-user] Fit Canvas to Path
On Sat, Nov 7, 2015, at 09:26 AM, Ofnuts wrote: > On 07/11/15 12:40, akovia wrote: > > > > On Fri, Nov 6, 2015, at 06:31 PM, Ofnuts wrote: > >> On 06/11/15 20:58, akovia wrote: > >>> Would it be possible to script this in any way? Seems like it should be > >>> a feature already as I keep looking for it but no matter how many times > >>> I check, it never appears. :P > >>> > >>> -- > >>> akovia > >> Stroke the path with a 1px brush and autocrop the image > >> > >> Without stroking it could be slow because you have to follow the path > >> pixel by pixel and keep min/max coordinates. To do it a lot faster you > >> can instead keep the min/max coordinates of anchors and handles but if > >> this guarantees that you get a rectangle that contains the path, in the > >> general case it won't be the tightest fit. > >> ___ > >> > >> > >> Thanks for the reply Ofnuts, > >> What I was looking for was to expand the canvas to accommodate a path. > >> The inverse is easy as I just load path to selection and then crop to > >> selection. It has always seemed instantaneous to me. > >> > >> I trace out elements in a picture and continue my path outside the > >> canvas to restore elements that were either cropped off or were never > >> there. I end up with a path that goes beyond the bounds of the canvas > >> and have to just take a stab of how big to enlarge the canvas to make it > >> fit. I usually just go overboard and use the technique I described > >> above, but I do it enough that a function to expand/fit canvas to path > >> would be extremely helpful. I'm guessing this just isn't possible with a > >> script/plugin at this point. > >> > > OK, see ofn-fit-canvas-to-path on > https://sourceforge.net/projects/gimp-path-tools/files/scripts/ > > Actually a mix of Bodo's ideas and mine. First compute a rough bounding > box using path coordinates, resize the canvas to this, then crop using a > selection on the path for a tighter fit. > > If you want to be able to add a margin just ask. > > > > > > ___ > gimp-user-list mailing list > List address:gimp-user-list@gnome.org > List membership: https://mail.gnome.org/mailman/listinfo/gimp-user-list > List archives: https://mail.gnome.org/archives/gimp-user-list !!! Just tried this now and already can't live without it. You have my utmost thanks. Truly! I saw you already added the margin option as well which is extremely useful for me. If I could make one suggestion, it would be to duplicate or replace the menu items to the vector menu as that's where I would use it from as I want to select which path to set it to. No worries if not as I can hack the script for my personal needs, but I think it would be better served in that menu. Thanks for putting a smile on my face. After your first response I thought it was kinda hopeless. Cheers! -- akovia ___ gimp-user-list mailing list List address:gimp-user-list@gnome.org List membership: https://mail.gnome.org/mailman/listinfo/gimp-user-list List archives: https://mail.gnome.org/archives/gimp-user-list