patrick_h_lauke Posted October 31, 2020 Posted October 31, 2020 For small/pixel art kind of work, it's sometimes not quite clear how nearest neighbor resizing operates. Sometimes, it works exactly as expected, while other times it seems to start "one pixel off" or something and the whole resizing becomes just a mush of pixels. Attached below, a recent case: a small 138x67 pixel raster image. the pixels are doubled horizontally, and I was attempting the resize to half the width to normalise those double pixels. The end result was a 69x67 pixel image where visibly the nearest neighbor calculation was off by one pixel. In the end, I fixed this by undoing, shifting the image layer by one pixel to the right, and redoing the resizing. Other times though, with exactly the same operation / trying to de-double pixels, it works just fine without having to first nudge the image. Just confused/not quite sure if I'm missing something obvious... Quote
patrick_h_lauke Posted October 31, 2020 Author Posted October 31, 2020 also notice the semi-transparent pixel there on the right of the resulting image, again leading me to think the algorithm started somehow "off by one" when trying to work out the neighbors Quote
Old Bruce Posted October 31, 2020 Posted October 31, 2020 32 minutes ago, patrick_h_lauke said: also notice the semi-transparent pixel there on the right of the resulting image, again leading me to think the algorithm started somehow "off by one" when trying to work out the neighbors And you should look at the upper right corner of the original image, there is a slight gap there. Makes me think that it is not 168 pixels wide, Make your grid have 1 pixel divisions and check it. This is from a zoomed in view of a screenshot from your first image. Quote Mac Pro (Late 2013) Mac OS 12.7.6 Affinity Designer 2.6.0 | Affinity Photo 2.6.0 | Affinity Publisher 2.6.0 | Beta versions as they appear. I have never mastered color management, period, so I cannot help with that.
lepr Posted October 31, 2020 Posted October 31, 2020 (edited) 37 minutes ago, Old Bruce said: And you should look at the upper right corner of the original image, there is a slight gap there. Makes me think that it is not 168 pixels wide, Make your grid have 1 pixel divisions and check it. This is from a zoomed in view of a screenshot from your first image. Looks like the the canvas is only 137.8 pixels wide, but I'm probably being fooled by an artefact of the view scaling. Edited October 31, 2020 by anon2 Quote
patrick_h_lauke Posted October 31, 2020 Author Posted October 31, 2020 how on earth would a document have a non-integer dimension like that? this was copy/pasted from another raster image, with pixel-snapping etc turned on. and, even assuming it somehow did have a width of 137.8 or whatever, why did that not show in the document resize dialog when it first opened? gah, some days, i wonder why i bother trying to do pixel-accurate stuff in affinity photo... Quote
lepr Posted October 31, 2020 Posted October 31, 2020 1 minute ago, patrick_h_lauke said: how on earth would a document have a non-integer dimension like that? this was copy/pasted from another raster image, with pixel-snapping etc turned on. and, even assuming it somehow did have a width of 137.8 or whatever, why did that not show in the document resize dialog when it first opened? gah, some days, i wonder why i bother trying to do pixel-accurate stuff in affinity photo... I edited my comment. The apparent non-integer size may be an artefact of the view scaling. Quote
patrick_h_lauke Posted October 31, 2020 Author Posted October 31, 2020 ok, so not a bug with resizing...just affinity being cavalier again when i want to do pixel-accurate selections, it seems. feel free to close. Quote
Old Bruce Posted October 31, 2020 Posted October 31, 2020 Have you tried using the Move Tool to select the layer in your original document and then use the Transform Panel to change the width to 69 pixels from the original 138? Quote Mac Pro (Late 2013) Mac OS 12.7.6 Affinity Designer 2.6.0 | Affinity Photo 2.6.0 | Affinity Publisher 2.6.0 | Beta versions as they appear. I have never mastered color management, period, so I cannot help with that.
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.
Note: Your post will require moderator approval before it will be visible.