nabsltd Posted August 21, 2018 Share Posted August 21, 2018 To reproduce: 1. New image 2. Create a new layer. 3. Draw a filled circle on "Layer 2" (keep it in the middle of the image) in a contrasting color from the "Background" layer. 4. Choose magic wand tool, set the Tolerance to 0%, and click anywhere in "Layer 2" except on the circle. 5. Ctrl+I to invert the selection. 6. Image->Crop to Selection (Ctrl+Shift+X). The expected result is a square image with a colored circle on a background, but you can see that the unselected pixels in all layers have been erased before the crop is applied. "Crop to Selection" should not erase pixels...it should only change the canvas size to match the selection. Quote Link to comment Share on other sites More sharing options...
Rick Brewster Posted August 21, 2018 Share Posted August 21, 2018 Please give some screenshots to illustrate exactly what you mean. Crop to Selection will indeed "erase" the pixels that are outside of the selection. That's 100% intentional. Quote The Paint.NET Blog: https://blog.getpaint.net/ Donations are always appreciated! https://www.getpaint.net/donate.html Link to comment Share on other sites More sharing options...
Ego Eram Reputo Posted August 21, 2018 Share Posted August 21, 2018 Even says so in the docs https://www.getpaint.net/doc/latest/ImageMenu.html#2 ? 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...
MJW Posted August 21, 2018 Share Posted August 21, 2018 @nabsltd, Crop to Selection does what it's supposed to do: it leaves only the selected region in the final image. You just don't like what it does. A while ago, I wrote a plugin that may help, called Unselected Rectangle Keeper. For your example, you'd select the background with the Magic Wand, then run Unselected Rectangle Keeper to delete everything outside the bounding rectangle,. You then can select the transparent region, invert the selection, and crop. Quote Link to comment Share on other sites More sharing options...
nabsltd Posted August 22, 2018 Author Share Posted August 22, 2018 (edited) 10 hours ago, Rick Brewster said: Crop to Selection will indeed "erase" the pixels that are outside of the selection. That's 100% intentional. Why is it intentional? The "crop" function on pretty much every other paint program just crops, since it's just one more keystroke (delete) before the crop to do the same thing that Paint.NET is doing on "Crop to Selection". By deleting before the crop, you don't give the user a choice. Also, is it only supposed to delete pixels on the selected layer, or on all layers? Because it deletes on all layers, which isn't explained in the help file. 7 hours ago, MJW said: A while ago, I wrote a plugin that may help, called Unselected Rectangle Keeper. For your example, you'd select the background with the Magic Wand, then run Unselected Rectangle Keeper to delete everything outside the bounding rectangle,. You then can select the transparent region, invert the selection, and crop. Thanks...I'll check it out, although I really shouldn't need to resort to a plug-in to do what other programs do by default. Tested it, but it still uses "Crop to Selection" at the end, which means that all the pixels outside the selection on all the other layers are deleted. Since I often have layers with single color fill (to test transparency), I then have to go back and re-fill all of them if I want to do any more editing. Edited August 22, 2018 by nabsltd Quote Link to comment Share on other sites More sharing options...
Eli Posted August 22, 2018 Share Posted August 22, 2018 (edited) All you need to do is copy the layer with the circle to the clipboard , create a new document and paste your on this new layer. Now you can crop your circle as you want (without affecting any other layers). If you need this cropped circle in your previous document, just copy it to the clipboard and paste on the original layer. By the way cropping the circle will result in a square layer. Round layers do not exist. Edited August 22, 2018 by Eli 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.