Jump to content

Selections are not snapped to pixels

Recommended Posts

I think it's best to illustrate what I mean through a picture, so I attached one (difficulty uploading it). Not much else to post except that I have Windows 7 32-bit. http://imgur.com/JfvPtRP


If you can't see the picture, it's at 3200x zoom and the selection tool is cutting through a pixel. I wrote the zoom incorrectly on the picture, by the way.

Edited by AnthonyScoffler
Link to comment
Share on other sites

I believe this user is being surprised by the anti-aliased selection. I'm not able to get angles like that without using an ellipse. I studied it because I pay close attention to pixel-editing bugs in paint.net and thought this might be interesting. Doesn't seem related to the zooming though.


I did find this, however: use the lasso tool to scribble a munged-up selection in a tiny area (with antialiased selection enabled).. try to keep it between 1x1 and 3x3. Scribble for several seconds, and then cut and paste. It may take several tries, but eventually you can get this exception:


System.AggregateException: One or more errors occurred. ---> System.ArgumentOutOfRangeException: must be non-negative
Parameter name: width:Int32=-25
   --- End of inner exception stack trace ---
   at PaintDotNet.Diagnostics.ValidationExtensions.ThrowValidationException(Validation validation) in D:\src\pdn\paintdotnet\src\Base\Diagnostics\ValidationExtensions.cs:line 955
   at PaintDotNet.Rendering.SizeInt32..ctor(Int32 width, Int32 height) in D:\src\pdn\paintdotnet\src\Base\Rendering\SizeInt32.cs:line 129
   at PaintDotNet.Actions.PasteAction.PerformActionImpl() in D:\src\pdn\paintdotnet\src\PaintDotNet\Actions\PasteAction.cs:line 356



While zoomed in, you can see that cutting and pasting anti-aliased selections cutting through pixels from an opaque image will result in semi-transparent pixels. It seems like copying and pasting opaque content should round-trip to an opaque result.


Sorry to stack so many topics in one thread, don't know if you can stand it.

  • Upvote 1
Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

  • Create New...