Jump to content
You must now use your email address to sign in [click for more info] ×

Forced pixel alignment/snapping ignored when copy/pasting or drag'n'dropping


Recommended Posts

This is a bug/issue from v1 which is still present in v2 - see 

 and 

Attaching some fresh recordings from v2. The crux of the problem, from discussion in the v1 bugs, seems to be that when pasting/dragging an image into a much larger image, Affinity tries to center the pasted/dragged image, which then leads to fractional x/y coordinates. When snapping/pixel alignment is on, these fractional coordinates should be rounded to the nearest full pixel.

 

 

Link to comment
Share on other sites

I have hit this also with V2.0.03 -- it's a flat-out bug, I think. And it's not just when putting a small image into a big one.

 

Related problem which I find even worse: if you scale an imported image to the snap edge, the border pixels are not fully covered. This is serious because you end up with a semi-translucent 1-pixel border. Workarounds are very awkward; you have to overscale by 1 pixel, which means snapping is basically worthless.

 

A simple test reproduces the bug -- I even attached an Affinity project file :)

  • drag a 200x200 white square into a 210x210 cavas
  • scale it to fill the canvas (note all pixel snaps are on etc)
  • You can see the fractional coverage bug in the gray artifacts at the edges and corner:

 

image.png.e1a73ba505244c996cfc3fc19db2ebeb.png

scale-snap-bug.afphoto

Link to comment
Share on other sites

You need to learn that a pixel that is enlarged by a factor of 1.05 will never fit into a 1x1 pixel square, it will need a 2 x 2 pixel area. and unsurprisingly the edges are going to be semi transparent.

Try enlarging a 30 x 30 pixel square. I will wager that it will work wonderfully. As will a 70 x 70  and 10 x 10 , 7 x 7 etc.

Mac Pro (Late 2013) Mac OS 12.7.4 
Affinity Designer 2.4.0 | Affinity Photo 2.4.0 | Affinity Publisher 2.4.0 | Beta versions as they appear.

I have never mastered color management, period, so I cannot help with that.

Link to comment
Share on other sites

When you scale an image to fill another image, snap should snap the outer edges of the pixels into alignment. If that's done correctly, there will be no semi-translucent border regardless of scale factor -- 1.05, 0.99, 200/30... whatever.

If you scale an opaque image to cover the entire canvas, the result should be opaque.

Link to comment
Share on other sites

16 hours ago, m888 said:

When you scale an image to fill another image, snap should snap the outer edges of the pixels into alignment. If that's done correctly, there will be no semi-translucent border regardless of scale factor -- 1.05, 0.99, 200/30... whatever.

Make a little black and white checkerboard, 2 pixels x 2 pixels stretch it to fit a 4 x 4 area.  Then stretch it to fit a 3 x 3 or 5 x 5 area.

Mac Pro (Late 2013) Mac OS 12.7.4 
Affinity Designer 2.4.0 | Affinity Photo 2.4.0 | Affinity Publisher 2.4.0 | Beta versions as they appear.

I have never mastered color management, period, so I cannot help with that.

Link to comment
Share on other sites

I appreciate the careful answers. I agree the intermediate pixels are blended in your stretch; that is normal for any non-integral zoom.

But in your own example, notice that when you stretch your 2x2 checkerboard to cover 3x3 or 4x4 or 5x5, the new area is FULLY covered. The edge pixels are not translucent.

The bug occurs when you do a similar stretch of particular resolutions. Try it with the numbers I used: with pixel snap on, scale a 200x200 white image to FILL an empty 210x210 canvas. Two edges are slightly translucent. That's a bug with the snap. You can prove it's a bug by turning off pixel snap and dragging the the edge an infinitesimal fraction of a pixel past the edge of the canvas -- immediately the border pixels become opaque.

Link to comment
Share on other sites

21 hours ago, m888 said:

I appreciate the careful answers. I agree the intermediate pixels are blended in your stretch; that is normal for any non-integral zoom.

But in your own example, notice that when you stretch your 2x2 checkerboard to cover 3x3 or 4x4 or 5x5, the new area is FULLY covered. The edge pixels are not translucent.

But I did do integer enlargements; 2 times 3 times and 4 times. Your enlargement was a 1.05 x enlargement.

Mac Pro (Late 2013) Mac OS 12.7.4 
Affinity Designer 2.4.0 | Affinity Photo 2.4.0 | Affinity Publisher 2.4.0 | Beta versions as they appear.

I have never mastered color management, period, so I cannot help with that.

Link to comment
Share on other sites

3 hours ago, m888 said:

Enlarging your 2x2 checkerboard to 3x3 is x1.5 (not integer). Enlarging it to 5x5 is x2.5. That's why you have blended gray pixels in those two zooms.

Well put. I obviously wasn't thinking. But your comment about blended pixels gets to the heart of the matter.  It seems that there is some sort of weird mixing going on within the boundary of the pixel selection.

Try filling a 2x2 pixel square with a complimentary colour to a background and you'll see what I mean. As you enlarge it the corners (and sides) get their colour mixed in with the background colour yet the alpha remains the same so it isn't a transparency thing. Use the Information panel.

I shall have to think on this some more.

Mac Pro (Late 2013) Mac OS 12.7.4 
Affinity Designer 2.4.0 | Affinity Photo 2.4.0 | Affinity Publisher 2.4.0 | Beta versions as they appear.

I have never mastered color management, period, so I cannot help with that.

Link to comment
Share on other sites

Hi @m888, I think it's not related to the pixel alignment because all coordinates are integral from your example. I suspect it's the issue on the image object.

My theory is, image objects are treated as vector objects which have a "Viewbox" bounding the pixels. It seems to me that there are invisible thin transparent edges between the boundary and the pixel. As long as you rescale the object, those edges stretch. I can reproduce it but it only happens in Photo but not Designer. So, it's probably a bug. You can report it in a separate post.

Hi @patrick_h_lauke, may I ask what's the reason for you to have the "Move by Whole Pixels" always turn on (I saw from your every screenshots)? I know its not related to your bug, I'm just curious. Shouldn't it be an obstacle to your pixel perfect work?

Link to comment
Share on other sites

3 hours ago, KarlLegion said:

may I ask what's the reason for you to have the "Move by Whole Pixels" always turn on (I saw from your every screenshots)? I know its not related to your bug, I'm just curious. Shouldn't it be an obstacle to your pixel perfect work?

it shouldn't be an obstacle under the assumption that i always start off at full pixels, so every movement also being always at whole pixels would make no difference

Link to comment
Share on other sites

33 minutes ago, patrick_h_lauke said:

it shouldn't be an obstacle under the assumption that i always start off at full pixels, so every movement also being always at whole pixels would make no difference

All you need to do is use Alt/Option to duplicate something and release it off the pixel grid. the duplicate will now be off the grid (forever) unless you have Move by Whole Pixels turned off. You can even just move something and accidnently hit the option key before releasing the mouse button and bang! You are off the grid. Forever if the Move by Whole Pixels is on.

Bottom line is if you are doing Pixel accurate work, Move by Whole Pixels is not your friend and can mess up your work real bad.

Mac Pro (Late 2013) Mac OS 12.7.4 
Affinity Designer 2.4.0 | Affinity Photo 2.4.0 | Affinity Publisher 2.4.0 | Beta versions as they appear.

I have never mastered color management, period, so I cannot help with that.

Link to comment
Share on other sites

2 hours ago, patrick_h_lauke said:

it shouldn't be an obstacle under the assumption that i always start off at full pixels

Only if you did start off at full pixels... So right now it's not ideal unless the bug is fixed. Turning it off at least letting you realign those misaligned pixels. Of course it's up to you, I'm just try to help with some suggestions. Thanks for your reply anyway.🙂

Link to comment
Share on other sites

  • 3 weeks later...

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.

Guest
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.

Loading...
×
×
  • Create New...

Important Information

Terms of Use | Privacy Policy | Guidelines | We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.