GNOME Bugzilla – Bug 119646
add polygonal selection tool
Last modified: 2008-05-24 07:22:47 UTC
gimp needs a polygonal lasso urgently. its strange it doesnt offer such a functionality. i know it could work with the at the moment broken vector tool. but why not implement a seperate polygonal lasso. i use it a lot with photoshop at work, and its really cumbersome when theres no such a thing in a graphical editing app. cheers markus hammer
Not sure how a "polygonal lasso" is supposed to work... Marking this as an enhancement request for a future version leaving the state as UNCONFIRMED - oh, and please do not mark non-critical bugs as critical.
think of the the freehand lasso where you just select the corner points of a polygonal selection. it comes close to the not-working path selector. but paths and lassos are seperate thing, i think there should be such a tool.
The new vectors tool seems to be quite well suited for the task you are describing.
given the fact that the toolbar is populated with stuff like color-correction tools and such. it'd be faster to access a seperate polygonal lasso tool just for the efficiency of not having to: *)draw path *)convert the path to a selection in photoshop many people use the polygonal lasso using the shift and alt modifier keys to add or remove a shape from the selection. doing all this using the path tool is a bit cumbersome in gimp. the tool also works to make easy horizontal/45/90 degrees lines using shift key - also a thing the path tool is missing. i am not sure but the path tool is a thing most new users have problem to handle. a common problem is that you delete an old path by mistake and have no undo function ...
There are not any longer any color correction tools in the toolbox of the latest 1.3 releases. But your suggestion seems to make sense. We already thought of subclassing the vectors tool to bring back the BezierSelect tool. It might make sense to do a similar class that provides the functionality you suggest.
*** Bug 157522 has been marked as a duplicate of this bug. ***
*** Bug 157681 has been marked as a duplicate of this bug. ***
It would be rather easy to add such a tool or, alternatively, to add a polygonal mode to the free select tool. Adding the easy-fix keyword. Perhaps it catches some developer's attraction then.
The polygonal lasso tool is the most used tool in other graphics manipulation applications such as photoshop and paintshop. We really miss this thing!!!
i get so sentimental when comments of this "unconfirmed" feature request reach me, 1 and a half years later :P
Actually - with the existing paths tool, I feel no need for this feature. Using vectors, the nodes can be positioned, repositioned, the line segments can be freely bent to follow the contours of the selected area, and it takes justa button click to convert the Path created in this way into a selection (in the tool options dialog). Alternatively, this action can be bound to a single keystroke. I had used the polygonal lasso a lot in other apps, and at that time, I could not re-place the nodes, it did not feature UNDO, no way to add intermediate nodes, no way to curve the segments. As Sven had said, it would probably not be hard to modify the current lasso tool to possibly use shift+click to create line segments. However, I think the Paths tool currently does a much better job. As for the Path tools shortcomings you mention: - Beginners, if that is the case, do not even have to know about the Paths dialog - a new path can be created, and converted to a selection. Each created path is silently kept as a path, if one cares to go back. - The ability to constarin angles is actually missing,and is dealt with in another bug report. (BUG 161778) - Undo for each action using the Path tool is fully functional. Actually, I even feel tempted to close this as 'fixed'.
*** Bug 170638 has been marked as a duplicate of this bug. ***
*** Bug 307995 has been marked as a duplicate of this bug. ***
what you are saying about the paths tool is indeed true but using this method is very slow. when you are breaking down a photo or drawing or any image of any sort there are always stright lines, to switch between the paths tool and back to the lasso tool after you have turned your path into a selection takes quite a while longer. i use the gimp mainly for coloring comics and breaking down the inks would be much faster if the gimp had this option, basicaly its just a little simpler then the paths tool. Dont get me wrong i understand that the paths can do this and much more its just that swithching tools and paths slows me down and i get paid by the page not by the hour :):)
I actually like the suggestion that was made in bug #307995: I would like to have the option to draw stright lines when using the lasso tool. much like the option for the pencil/brush/air brush and erasier tools. We could use Shift here like in the paint tools. With a hint in the status bar it would even be discoverable.
wow, 2 years since i reported. still not implemented. imho open source developers dont care about solutions but want us all to use hacks and workarounds to get our jobs done. nice.
You misunderstood the concept of Open Source. The idea of Open Source is to allow *you* to implement the features that you think are missing. Alternatively you could get someone else to do it for you. Flaming in bug reports is not a good way to achieve that.
Hey, markush, do your parents have a bug tracker? I'd like to file a bug with them, because they raised their children to believe that making rude demands to volunteers is acceptible behavior. Shameful. If you can't implement something you urgently need, you could hire someone to implement it for you. But if you can't or won't contribute in some meaningful way, you're in no position to dictate someone else's schedule.
i have no idea who that guy markush guy is. I have ALOT of respect for you programers out there. i totaly understand that you guys are NOT gettin paid for any of the work you do on the gimp.I was just trying to report a small problem that i saw with the lasso tool. i was thinkimg that this would make the program easier to use and basicaly better for everyone.I also noticed last night while useing the paths tool in the gimp that when you change a path into a selection the selection is antialiased is there any way there can be an option to have this turnd off or on like in the lasso tool? thanks for your time vic short
*** Bug 314471 has been marked as a duplicate of this bug. ***
*** Bug 314910 has been marked as a duplicate of this bug. ***
I just saw another request for this the other day in the GIMP-User mailinglist and I know I could use such a tool as well (in particular if it has an option to disable anti-aliasing). Is there any chance that this tool might get into 2.4? I've been told that it should be fairly simple to implement, but since I'm not a GIMP developer, maybe I'm asking a lot. Thanks in advance for any feedback on this.
Recommending 2.4 target.
*** Bug 334462 has been marked as a duplicate of this bug. ***
Could this not be implemented by a modification to "lobotomize" the Intelligent Scissors tool? I.e., if there were a Tool Option to disable the "warp to color changes" then the points would be connected with straight lines. This would seem both intuitive and non-intrusive to the user interface.
Created attachment 64876 [details] [review] Straightline scissors Implementation of Comment #25 (patch is for CVS 2.2.12). Note: this new functionality exhibits the same buggy behavior described in Report #313634.
Does it really make sense to hide this basic functionality in the Intelligent Scissors tool? I don't think this is very intuitive.
To me, it is intuitive that a "polygon" is a "shape" and it would make sense that a tool which purports to "select shapes from the image" should permit you to select polygons from the image. Personally, I think the basic functionality of the Scissors tool should be this "polygonal" mode and that the 'snap-to-color-gradient' intelligence should be what is then selected as a Tool Option. The basic tool should be the "Scissors" and the adjective "Intelligent", being a modifier of the Tool, should also be a modifier of its operation. Overall, I shouldn't be upset if the patch is rejected. In the future, I would rather see the 'snap-to-color-gradient' option be added to a new "curve" type (editable with the Paths tool) and the Scissors tool "retired". With all respect to the original author of the Scissors tool, both its interface and its data structures appear to be non-standard and it would better be updated to the current state of GIMP development and user interface efforts.
*** Bug 343877 has been marked as a duplicate of this bug. ***
Upgrading target from Future to 2.6, and raising priority.
I'm glad this enhancement has priority High. A polygonal lasso tool would incredibly increase my creative potential while using gimp. As mentioned above, there are workarounds, like the path tool, that could give you similar results. However as the path tool cannot be combined with the selection tool those workarounds are quite long winded. However, intuitive and easy tools improve the way you work incredibly. To cut a long story short : Implementing this feature would certainly expand the group of people using gimp.
Why hasn't the patch in comment #26 been committed? Are there quality issues? It seems like a good way to close this bug and give a feature that people have been asking for for 2 years.
Maybe because of comment #27?
People are asking for a simple tool to select polygonal shapes. It makes no sense to add this functionality to an already complex tool like Intelligent Scissors, especially when it does something completely different. We already have a way to select polygonal shapes using the Path tool. Adding a dedicated tool for this might make sense as it would make things easier. Cluttering more tools with already available functionality is of no value.
Let's just put it this way: I use PhotoShop on a daily basis, and always use the lasso select tool in every session because of the quick, intuitive way it allows me to select polygonal areas, such as the edges of product cabinets and so on. This is currently impossible to implement in a straightforward way with Gimp. Thus, I do not use Gimp at all, after having wasted a frustrating couple of hours trying to get it to exhibit this (to me, anyway) very basic and essential functionality. I am by no means alone in using the lasso tool extensively, as the comments in this thread state clearly. If I had the knowledge to contribute to developing this functionality, I'd do it in a heartbeat. But my skillset is different. If the object of this community is to implement an alternative to costly proprietary software, it won't succeed unless or until it offers equivalent or preferably superior functionality. End of story.
The functionality is there, for quite a while already. This report is just about making it easier to use. If you are interested in this, you should start to contribute. It's not our objective to provide you with an alternative to costly proprietary software. It is our objective to have fun developing a powerful application for image manipulation. Success in the sense of market share is completely irrelevant.
Given that the select tools use shift for "add to selection" and ctrl for "subtract from selection" and alt for "move selection" it doesn't seem this can be implemented as Comment #15 suggests. Since it's been rejected to use the select shapes tool for this feature, would a toggle button be acceptable instead? Or is this high priority bug best implemented as another tool altogether? I'm not sure that the Shift straight line functionality could be easily added anyway, as on release currently the shape is sealed.
A dedicated tool might be a better choice than overloading existing tools.
This is the way the dedicated tool could work: 1. Click on the tool's icon. 2. Hold down a key, such as <ALT> for freeform, <SHIFT> for 45 degree constraints. 3. Click on the image while holding down the key. 4. A rubberband forms that anchors on that first click. 5. Continue rubberbanding and anchoring further points by clicking. 6. Release the key. 7. The polygon is completed from the first to last point. 8. The interior of the polygon is now selected. This is simplifying a bit; a real-world tool would of course have settable aliasing and a few other refinements. Of course, it should be possible to invert the selection easily. If "It is our objective to have fun developing a powerful application for image manipulation", then this would seem like a useful tool to have close to the surface and easily accessible. Even though "Success in the sense of market share is completely irrelevant", making a kick-ass application even better can't hurt unless all Gimp developers actively disdain market share. Which I doubt is the case, because we're all hard-wired to enjoy positive feedback :)
It seems to me one of the major points of having its own dedicated tool is to be able to have consistent modifier keys as the rest of the selection tools: shift for add, ctrl for subtract, and alt for move. Out of curiosity, what do you propose for the behavior when you aren't holding down any modifiers if alt is freefrom this implies not holding alt is a non free form type action?
Sorry, I don't understand what you mean by "free form". Also perhaps it would be better to have this discussion on the mailing-list and only put the results into bugzilla.
"Free form" means, well, free form. You can move the cursor without constraints. To keep key usage consistent, here is a revised suggested MO for the polygon select: 1. Click on the polygon select tool's icon. 2. Click on the image. 3. A rubberband forms that anchors on that first click. 4. Continue rubberbanding and anchoring further points by clicking once for each new point. 5. Doubleclick on the last point, OR click on the selector tool again, to end the selection. 6. The polygon is completed by adding an implied selection from the first to the last point. 7. The interior of the polygon is now selected. IMHO the best way to move this subject off BugZilla is to complete the tool :)
No tool should be written without doing a full specification beforehand and discussing this spec on the mailing-list(s). Bugzilla is the wrong place for such a discussion. If you want to do something to help, please make a list of usage scenarios that involve creating polygonal selections. Then analyze how these scenarios can be performed using the existing tools and identify problems. With the list of scenarios and problems, you are then able to analyze and to compare different possible solutions. These solutions might involve changing existing tools or adding new one(s). As soon as we have identified the best solution, it can be fully specified. Only then can someone can start to implement it.
I think this feature request is pointless. Vector tool already allows poligonal shapes and turning vectors to selection work with the same keyboard shotcuts than free selection to perform boolean operations. The only thing I find interesting in this request is the hability to apply some angle constraints to the path using a key shorcut (i.e. pressing a CTRL to lock the path segment to 45º or 90º relative to the previous node)
I know there is some opposition against this feature from people how regard it as pointless. But to make this clear, although the Vector tool allows poligonal shape selections, it is not the same as a polygonal selection tool. A polygonal selection tool provides much more, especially when implemented into the free selection tool by making it similar to the brush tool(when pressing "shift" to draw straight lines). The vector tool just doesn't add to your workflow. Some users just need to be able to switch quickly between deleting and adding polygonal, free, rectangular and circular selections(for example when doing funny shapes for backgrounds or whatever). I guess most people know this from photoshop and I'm sure most of them know, which impact this thing has on your workflow. Anyway, as Sven said, bugzilla is the wrong place for a lot of discussion...
There is absolutely no opposition. Someone just needs to write the code and it appears that the people who are capable and willing to write code have better things to do. If you want this feature, go ahead and implement it.
Ok, I would have written a patch already if there wasn't so much "we don't need this feature" talk. There is definitely opposition somewhere.
My POV as someone who uses Photoshop intensively, is (alas) not fluent in the coding language used for GIMP source, and can't use GIMP because it lacks the constrained polygonal selection feature: The programming elite says, in essence, that because they can think of other, advanced features of GIMP that advanced experts can use to more-or-less emulate constrained polygonal selection, those who come forward and in good faith suggest that this feature be added to GIMP in a user-friendly way analogous to Photoshop's are whiners and fools. It's like arguing that the number 5 on a calculator keyboard is unnecessary because the number 5 can be created at any time by raising e to the power 1.609437912. This elitism is annoying but will no doubt continue indefinitely. I will of course be attacked for posting this, and nothing will change except that the hoi polloi's admiration for the elite will continue to grow. Welcome to open source as it works in practice.
Stop whining then and attach a patch that implements that tool. Welcome to open source as it works in practice.
John, that was harsh... I had my differences before with some of the developers, and I'm not always a big fan of all the decisions taken, but your last comment is quite out of place bacause you stain the whole open source movement suggesting that. These guys are using their spare time doing their best for Gimp. Not all of them think the same way. Some of them are more accesible and some of them are more "difficult", but be sure that all of them do what they think is the best for the program. That's how open source works in the practice. It's a group of people doing their best seeking for quality. Are there conflicts? Yes, of course. They're humans. You can be pissed off if they ignore a bug report, but here we're talking about a feature request that you and a group of users think is great, but other users (like me) suggest that isn't critic because there is an easy workaround. I've been a regular PS user for years, and recently switched to gimp. There are lots of things that I had to change to get used to Gimp. But it was only that: getting used to a different workflow. I do think that angle constrains for the path tool are a need. But I don't agree when somebody says that creating a path with straight lines and pressing CTRL+ENTER is so problematic. I know I'm doing wrong writing this here. This place is not intended for this kind of discussions. Move it to the IRC channel.
Created attachment 99598 [details] [review] 001_gimp-polygonal-selection-tool.patch Here is a polygonal selection tool based on the freehand selection tool (still uses that icon). It is possible to move vertices of a half-done polygon, and also to use backspace to delete the added vertices in a FIFO manner. It works rather well already and I think it would make sense to commit this after perhaps a few reviews to trunk and build on it there. It will be easier for the GUI folks to make a spec based an already exising functionality.
Martin, this is excellent! the rubberbanding and backspace/enter combo both work very quickly, and combining feathered and non-feathered usage is extremely effective. I want to help to get this into SVN. The following issues still exist: * It would be more apparent that you could move points if the cursor changed at those times (using the standard move cursor in combination with the polyselect cursor), as well as the current 'rubberbanding line vanishes'. Or a handle (like the path anchorpoint handles) appearing over the point. yes, this second sounds better, 'cause it also indicates exactly which point is being moved. * The icon. I'll attach some icons here, based on the rectangle select icons. The attachment includes a partial diff -- I think there should be a polygon-select cursor too, but haven't figured out how to make it work. I also cleaned up (poly -> polygon) on the basis that 'poly' is ambiguous. * The tool is not present in the Tools menu, only in the Tools dockable. Also fixed in my update of your patch. * Flickering increases as the number of points in the poly rises. Cairo might help this -- the paths tool has the same issue. * The behaviour is LIFO, not FIFO, as far as I can see. Which is appropriate -- your comment is just misleading as to what actually happens.
Created attachment 99611 [details] [review] cleaned up/enhanced patch This patch provides all but the source png/xcfs, which are in the following .tar.gz attachment, since they're binary.
Created attachment 99612 [details] new icons Execute 'tar -zxvf polygonicons.tar.gz' at the root of your GIMP svn tree to install these. They are based on the rect select icons.
(In reply to comment #52) > Martin, this is excellent! the rubberbanding and backspace/enter combo both > work very quickly, and combining feathered and non-feathered usage is extremely > effective. > The following issues still exist: > [...] Glad you liked it. I think changing cursor to the move cursor would be better, I think this tool should resemble the free hand select as much as possible. A big point of this tool is to be a very simple polygonal selection tool in constrast to the much more advanced vector (path) tool. Jimmac has hinted that he will make a polygonal selection tool icon [1] that fits with the rest of the icon theme so we should wait for that one instead. The flickering could be fixed even with XOR drawing by being more smart and just redrawing the pending point line instead of all lines, but yes that's rather pointless since we hopefully will make tools use Cairo soon anyway. Ah yes, LIFO of course, not FIFO. Thanks for updating the patch, but it's not really necessary :) that patch is an 8 hour hack and just pointing out problems suffices. This is more a proof of concept, the GUI team will have to give their input before it makes sense to commit. [1] See http://tango.freedesktop.org/ArtLibreSet
Well, ya see, I actually want to use this, like right now, so it helps if everything looks right and I can distinguish the polygon-select icon from the freehand-select icon. I imagine there are others in a similar position. Other issues: * No constraining, obviously. I can see why you left this out so far -- waiting on the GUI team. * switching between replace/add/subtract/intersect modes is a bit weird, in that you can do it at anytime, and eg. if you release CTRL to press Enter, then the result is your polygon selection replaces the previous one instead of subtracting from it.
I commited this version of the tool to trunk (rev 24753) as agreed on the mailing list. 2008-01-30 Martin Nordholts <martinn@svn.gnome.org> Added a Polygon Select Tool which is a primitive selection tool based on Free Hand Select. Code filtered through David Gowers who also made the tool icon. This version of the tool is a for-now solution to bug #119646. * app/tools/gimppolygonselecttool.[ch]: The new tool. * app/tools/gimp-tools.c: Add the tool. * app/tools/Makefile.am: Add tool source. * app/widgets/gimphelp-ids.h: Add help id for the tool. * libgimpwidgets/gimpstock.[ch]: Setup for the new tool icon. * menus/image-menu.xml.in: Add action entry for the tool. * themes/Default/images/tools/stock-tool-polygon-select-{16,24}.png: Tool icon graphics. * themes/Default/images/Makefile.am: Add tool icon graphics. I suggest we keep this bug report open until the fate of the tool is clearer.
A minor note on current implementation, if I dare to express one :) 1. The icon is placed in the bottom of the Tools window, where as it should be placed higher, among other selection tools. 2. The related messages are not translatable (either not marked for translation, or not added to the list of translatables, or both).
1. You are using a toolrc file from before the new tool. rm ~/.gimp-2.5/toolrc and let GIMP create one from scratch now that the new tool is present. 2. Oops. Patches accepted though
I didn't find any problems with translatable strings, feel free to drop by on IRC and let me know if there still is a problem. There have been some additional work on this tool after my initial commit. I am closing this as FIXED now. Let's handle contingent changes and enhancements separately.
Marting, you didn't add the new file to po/POTFILES.in. Mitch did that for you yesterday.
For reference, commited to trunk, rev 25783: 2008-05-24 Martin Nordholts <martinn@svn.gnome.org> Kill the Polygon Select Tool. The Free Select Tool now provides a superset of the old Polygon Select Tool functionality. We still keep the tool icons etc around though, they might come in useful in the future. * app/tools/gimppolygonselecttool.[ch]: Removed. * app/tools/Makefile.am: Removed gimppolygonselecttool.[ch]. * app/tools/gimp-tools.c (gimp_tools_init): Don't register the Polygon Select Tool. * app/widgets/gimphelp-ids.h: Remove GIMP_HELP_TOOL_POLYGON_SELECT.