old banshee Posted January 8, 2020 Share Posted January 8, 2020 Hey guys, is there any way of select areas by shape. I know you can use the magic wand and select the same colour in an image but I want to select the same shape from an image. An example would be triangles, circles, rectangles, squares, diamonds and the likes. All the best, Frank Quote Link to comment Share on other sites More sharing options...
Reptillian Posted January 8, 2020 Share Posted January 8, 2020 You're gonna have to resort to vector apps for this. Quote G'MIC Filter Developer I am away from this forum for undetermined amount of time: If you really need anything related to my PDN plugin or my G'MIC filter within G'MIC plugin, then you can contact me via Paint.NET discord, and mention me. Link to comment Share on other sites More sharing options...
old banshee Posted January 8, 2020 Author Share Posted January 8, 2020 Sorry what is vector apps? Thanks for the reply. Quote Link to comment Share on other sites More sharing options...
Reptillian Posted January 8, 2020 Share Posted January 8, 2020 "Vector graphics are computer graphics images that are defined in terms of 2D points, which are connected by lines and curves to form polygons and other shapes." Raster graphic image processing applications has zero concept of polygon or line. You can't select shapes that way. Quote G'MIC Filter Developer I am away from this forum for undetermined amount of time: If you really need anything related to my PDN plugin or my G'MIC filter within G'MIC plugin, then you can contact me via Paint.NET discord, and mention me. Link to comment Share on other sites More sharing options...
HyReZ Posted January 8, 2020 Share Posted January 8, 2020 (edited) 3 hours ago, old banshee said: Sorry what is vector apps? Vector apps are image editors that permit the user to create vector images. Paint.NET is not a vector app! Its images are saved in Raster (Bitmap) formats. Vector vs Bitmap (Raster) Images:https://youtu.be/fy9Pby0Gzschttps://youtu.be/XI0rf2r-dx8The shapes in BoltBait's Package are vector graphics in XMAL format. After the image is saved, it is converted into a Raster (Bitmap) and is no longer scaleable. Edited January 8, 2020 by HyReZ Quote Link to comment Share on other sites More sharing options...
old banshee Posted January 8, 2020 Author Share Posted January 8, 2020 Ok thanks guys. I will have to look for a work around. Quote Link to comment Share on other sites More sharing options...
Ego Eram Reputo Posted January 8, 2020 Share Posted January 8, 2020 welshblue has given you the solution. Ignore the answers referencing vector apps and just follow what welshblue posted: 1. Add a new layer to your image. 2. Render the required shape to the new layer. It's easier if you use the "filled shape" option in the toolbar. 3. Select the shape with the magic wand. 4. Activate the image layer and the selection is made. Quote ebook: Mastering Paint.NET | resources: Plugin Index | Stereogram Tut | proud supporter of Codelab plugins: EER's Plugin Pack | Planetoid | StickMan | WhichSymbol+ | Dr Scott's Markup Renderer | CSV Filetype | dwarf horde plugins: Plugin Browser | ShapeMaker Link to comment Share on other sites More sharing options...
Red ochre Posted January 8, 2020 Share Posted January 8, 2020 Additionally, selections can be copied (Edit/Copy Selection) then pasted into a text program such as 'notepad' and saved as an '.xml' '.json' (Edit by Rick: it's actually JSON, not XML) file. They can then be re-used at a later date by copying the .xml text in notepad then using 'Edit/Paste Selection'. They remain 'vectors' until committed to the canvas - as I understand. @E.E.R. - I couldn't find this in the documentation - but I didn't search for long ;-) @old banshee - well worth reading through the docs though (press F1 while Pdn is open). Quote Red ochre Plugin pack.............. Diabolical Drawings ................Real Paintings Link to comment Share on other sites More sharing options...
Ego Eram Reputo Posted January 9, 2020 Share Posted January 9, 2020 6 hours ago, Red ochre said: @E.E.R. - I couldn't find this in the documentation - but I didn't search for long 😉 Under the Edit menu my friend https://www.getpaint.net/doc/latest/EditMenu.html#9.2 https://www.getpaint.net/doc/latest/EditMenu.html#9.4 1 Quote ebook: Mastering Paint.NET | resources: Plugin Index | Stereogram Tut | proud supporter of Codelab plugins: EER's Plugin Pack | Planetoid | StickMan | WhichSymbol+ | Dr Scott's Markup Renderer | CSV Filetype | dwarf horde plugins: Plugin Browser | ShapeMaker Link to comment Share on other sites More sharing options...
old banshee Posted January 9, 2020 Author Share Posted January 9, 2020 Ok Here is what I want to do I should have posted this before. The image shows all the areas with letters in so you can see the shapes that are the same. Take A for instance, if I wanted to select all the A shaped areas one would use the magic wand tool and select all the spaces marked A holding the ctrl key down as one does so. On could then fill all the shapes with a colour and then one would be able to select all the A spaces by colour with the magic wand. What I was asking was could I select all the A areas by there shape without colouring the spaces or selecting the areas one at a time. Thanks again for all you responses. Frank Quote Link to comment Share on other sites More sharing options...
Red ochre Posted January 9, 2020 Share Posted January 9, 2020 @E.E.R - I should have looked harder...who would expect it to be in a logical place!😉 @Old Banshee (Frank) You cannot select directly by shape but you could select all shape-A's, for instance, then save that selection for later use. (See E.E.R's links). Your method of colouring the selections as objects and saving on another layer my be just as good for one image. Quote Red ochre Plugin pack.............. Diabolical Drawings ................Real Paintings Link to comment Share on other sites More sharing options...
Reptillian Posted January 9, 2020 Share Posted January 9, 2020 (edited) I was expecting the problem to be something like that rather than layer-by-layer shape selection. Right now, what @Red ochre is your best route for this issue. Theoretically, someone could write up a plugin that converts shapes based on searching pixels by pixels, and if it found, then that area is colored. I have pictured it in my head, and it seems do-able. It's comparison by pixels through pixels, so doable in principle. If they're of different areas, theoretically object size filtering would solve your problem, or it becomes closer to the solution. @MJW has written a plugin just for this, but it doesn't address colored background. I have written that for G'MIC, but you'd need to reduce the number of color in say that image. Either do some processing to filter out the colors, and then use @MJW plugin or reduce number of colors and use Object Size Filtering under G'MIC QT. I have attempted it, well, I guess then theory doesn't really work out, and manual solution seem to be the fastest. Edited January 9, 2020 by Reptillian Quote G'MIC Filter Developer I am away from this forum for undetermined amount of time: If you really need anything related to my PDN plugin or my G'MIC filter within G'MIC plugin, then you can contact me via Paint.NET discord, and mention me. Link to comment Share on other sites More sharing options...
old banshee Posted January 10, 2020 Author Share Posted January 10, 2020 And the reason why I want to do this for those interested is I need to fill shapes with other shapes. Thanks for all your help, Frank Quote Link to comment Share on other sites More sharing options...
Reptillian Posted January 10, 2020 Share Posted January 10, 2020 (edited) 7 hours ago, old banshee said: And the reason why I want to do this for those interested is I need to fill shapes with other shapes. Thanks for all your help, Frank Could you PM me the original shape image uncompressed, I believe I thought of a theoretical solution using coding and I want to code it. For anyone else reading this, I believe two for loops (current pixel, and relative pixel) and comparison should solve this. Edited January 10, 2020 by Reptillian Quote G'MIC Filter Developer I am away from this forum for undetermined amount of time: If you really need anything related to my PDN plugin or my G'MIC filter within G'MIC plugin, then you can contact me via Paint.NET discord, and mention me. Link to comment Share on other sites More sharing options...
Eli Posted January 10, 2020 Share Posted January 10, 2020 I do not know if this can help but @Joshua Lamusga did some work on pixel replacement. Quote Link to comment Share on other sites More sharing options...
Reptillian Posted January 10, 2020 Share Posted January 10, 2020 (edited) Alright, another attempt. Using this test code for code[local] or code[global] filter in g'mic-qt plugin. repeat $! l[$>] to_rgb rgb2hsv channels 0 tones 2 k. erode 5 dilate 5 +area_fg 0,0 f. i>ia?0:i store. area +gradient2rgb , +f. i>0 compose_channels. + f. i>0 negate. inpaint_pde.. . rm. rv +blend shapemedian0 blend[^-1] shapeaverage0 blend average n. 0,255 rgb2hsl sh. 1 f. i>0?1 rm. hsl2rgb $area n. 0,360 +f. i0#1>0?1 . a[^0] c hsv2rgb. blend interpolation,.5 endl done Can't say I have been successful though. It's a difficult problem. The code use gradient angle and find the angle of each shape. I don't what to do on the area part, but it converts area into hsv format. Then I blended them to filter out the shape. Perhaps, I think I should do more work here. It does look promising I must admit. The next step is to try to do multiple variable to filter out shapes by if else statements. It is possible to do thinning here too. I'll find out what to do. Edited January 10, 2020 by Reptillian Quote G'MIC Filter Developer I am away from this forum for undetermined amount of time: If you really need anything related to my PDN plugin or my G'MIC filter within G'MIC plugin, then you can contact me via Paint.NET discord, and mention me. Link to comment Share on other sites More sharing options...
old banshee Posted January 11, 2020 Author Share Posted January 11, 2020 PM sent. Quote Link to comment Share on other sites More sharing options...
old banshee Posted January 15, 2020 Author Share Posted January 15, 2020 Reptillian, did you get the PM? Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.