Jump to content

Odd alpha behavior during (supposedly) pixel-aligned cut-and-paste


Recommended Posts

I am encountering a weird bug when trying to cut-and-paste pixel-aligned rectangular regions from one image to another in Affinity Photo 1.8.3.  This bug seems to be present in at least all 1.8.x versions that I had, so it is not specific to 1.8.3.  Whether it goes back further than the 1.8 branch is anyone's guess.

If I open two images, one completely blank (literally nothing, so rgba all 0) and the other an RGB image with no alpha, then use the rectangle select tool to select a rectangular region in the RGB image, CTRL-C to copy, switch to the blank image, then CTRL-V to paste, I get weird partial alpha at the edges of the selection in the paste.  These appear to be because of sub-pixel alignment, but I copied a pixel-aligned region and pasted pixel-aligned as well... and in fact, I have the "whole pixel" alignment enabled the whole time, so it shouldn't be possible for me to be off-pixel alignment unless I'm misunderstanding the intended behavior of that feature.

If I then turn off whole pixel alignment and slide the pasted region slowly, I can manage to get it back into alignment and the partial transparency resolves itself mostly (although it still may be slightly wrong).

What is going on here?  Is this some sort of bug with whole-pixel alignment that nobody noticed?  Or am I doing something weird?

Thanks,

- Casey

Link to comment
Share on other sites

  • 2 weeks later...

I normally only use Affinity Photo on my main Windows machine, but I installed it on another Windows machine here that has recording software on it so I could try to record the video you requested.  In so doing, I stumbled upon what the issue actually is!  It is not related to the document or the workflow, actually - it is related to the monitor setup. I installed it on a third Windows machine just to verify, and the pattern seems to hold:

When using Affinity Photo on machines with a single monitor, pixel alignment works as expected.  It is only when I use Affinity Photo on a machine with multiple monitors that this problem occurs.  It may also be the case that the monitors must have different resolutions, but I do not have any machine with two identical monitors so I am unable to test that.

Is it possible that the pixel-snapping code is actually not snapping properly when multiple monitors are involved? Perhaps if the monitors have different DPIs as well?

Are you able to reproduce this there now?  You do not need to do anything special at all, you can just:

  1. Install Affinity Photo on a machine with two monitors that have substantially different resolutions (say, one is 1920x1200 and one is 3840x2160).
  2. Create a new document (say, QFHD).
  3. Hit the PRT SCR key to capture the desktop.
  4. Select "New From Clipboard" from the file menu to create a second document with the image.
  5. Pixel-exactly select a rectangular shape using the rectangle select tool (say, the Affinity logo button in the upper left).
  6. "Copy Flattened" to copy the rectangle.
  7. Switch back to the empty QFHD document.
  8. "Paste" to paste the Affinity logo.

The pasted rectangle should be obviously off-pixel alignment (the edges will be blurred, and the marquee doesn't line up with the document pixels).  I believe I can now definitely say this is a bug, because it happens on a completely clean install of the latest Affinity Photo download right out of the gate, no preference changes necessary, no prior usage of the software necessary, no particular files necessary, etc.

- Casey

Link to comment
Share on other sites

  • 1 month 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.