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

Using "New From Clipboard" Pastes Incorrectly in Affinity Photo 2.0.3


- S -

Recommended Posts

Using "New From Clipboard" pastes a captured screenshot incorrectly in Affinity Photo 2.0.3.  

In the below example, when copying & pasting a full-screen Command Prompt window, part of the scrollbar on the right-hand side of the image gets shifted to the left-hand side when pasted (3 pixels).  The left bit also moves up 1 pixel (so the bottom-left corner ends up with 3×1 pixel transparent area).

Screenshot A:

141244971_ScreenshotA.thumb.png.d58d36c8f0624d3aa173a3d6d67fff09.png

Steps to reproduce:

1) Take a full-screen screenshot by pressing the "Print Screen" (PrtScn) button on the keyboard.  It doesn't make a difference what's screen captured – I chose a Command Prompt window because a dark window with a light scrollbar makes the issue clearer to see.

2) Then either:

a) Go to [File > New From Clipboard]

b) Or go to [File > New > FHD 1080p] and then [Edit > Paste]

3) View the left and right edges of the pasted screenshot.  The image has shifted when pasting.


When pasting the captured screenshot into Microsoft Paint, the pasted image is OK and not shifted.  Therefore, Windows seems to be copying it to clipboard correctly and Microsoft Paint seems to be pasting it from clipboard correctly.

When using the [Windows Key + PrtScn] shortcut keys to save the screenshot directly to %UserProfile%\Pictures\Screenshots as a PNG file, the image is also OK and not shifted.

This issue occurs in Affinity Photo 2.0.3.1688.  I'm pretty certain it didn't occur in Affinity Photo 2.0.0.1640.  Initially I was thinking that this could be a Windows bug, however as it works correctly in Microsoft Paint, I think there is something else going on here.

Animation showing shifted edges:

 

Example files:

Example files.zip


-----
Windows 10 22H2 (19045.2364)
1920×1080 monitor.  Windows display scaling set to "100% (recommended)"

 

Link to comment
Share on other sites

  • 2 weeks later...
  • Staff

Hey - S -

I've tried to reproduce this on 3x different machines and haven't been able to. We're all on Windows 11, though.

We are all using the Recommended Windows scaling too. Does it make a difference if Force Pixel Alignment is toggled?

Link to comment
Share on other sites

I have the same issue. I have a two-monitor set up. When I take a screenshot, this is what I observe:

  • The left side of the screenshot shows 3 px of the right side of the right monitor.
  • 3 px of the right side of the screenshot (right monitor) is cut off.
  • Nothing is missing in the center of the screenshot, but the position where the left and right monitor meet is offset right 3 px. The point where the left and right monitor meet should be the exact center of the screenshot (1920 px), but they meet at 1923 px.

This issue occurs in Affinity Photo and Designer V2. The issue does not occur V1.

Enabling and disabling Force Pixel Alignment has no affect.

Windows 10 22H2
Two monitors
Windows Scale and Layout: 100% (Recommended); Display Resolution 1920 x 1200 (Recommended)
Affinity Photo 2.0.3

image.thumb.png.4a4590da10db6f156b4086912d64a0b8.png

Link to comment
Share on other sites

13 hours ago, Chris B said:

Does it make a difference if Force Pixel Alignment is toggled?


I always have "Force Pixel Alignment" set to On and "Move by Whole Pixels" set to Off.  However, the issue occurs whether they are enabled or not.

I've just double-checked and the issue is definitely due to changes made in Affinity Photo 2.0.3.1688.

I uninstalled 2.0.3.1688 and went back to 2.0.0.1640 and the issue does not occur in 2.0.0.1640.  When I installed 2.0.3.1688 again, the issue started again straight away.

Video 1 (Copying screen to clipboard using the keyboard Printscreen button):
– Comparing 2.0.3 (working incorrectly) to 2.0.0 (working correctly)

Video 2 (Copying locally saved file to clipboard from the Windows Photo app):
– There is a slightly different behaviour when copying from the Windows Photos app, rather than using printscreen.  Copying and pasting this way only appears to affect [File > New From Clipboard], not [File > New…] like in video 1 above.

 

Quote

I've tried to reproduce this on 3x different machines and haven't been able to. We're all on Windows 11, though.

Affinity Photo 2 system requirements list "Windows 10 May 2020 Update (2004, 20H1, build 19041) or later", so I'm not sure why you don't have any Windows 10 test machines.

 

Link to comment
Share on other sites

6 hours ago, Brian_J said:

I have the same issue. I have a two-monitor set up. When I take a screenshot, this is what I observe:

  • The left side of the screenshot shows 3 px of the right side of the right monitor.
  • 3 px of the right side of the screenshot (right monitor) is cut off.
  • Nothing is missing in the center of the screenshot, but the position where the left and right monitor meet is offset right 3 px. The point where the left and right monitor meet should be the exact center of the screenshot (1920 px), but they meet at 1923 px.

 

Yeah, that's exactly the same issue (although I only have one monitor).  Even down to the 3 pixels on the left of your screenshot being shifted up by one pixel.

Untitled.thumb.png.786af89acbd0816dcc6ccb54babb1be2.png

 

Link to comment
Share on other sites

It is not just Affinity that is affected by the issue. I've just tried to paste a screenshot in a new image using XnViewMP with the same outcome: The three right-most pixel are placed on the left side of the pasted image. However, if I do a second screenshot it gets pasted correctly once in a while. Again, if I copy the incorrectly pasted image from XnViewMP and paste it in Affinity, the offset is gone... Unfortunately I can't reproduce this behaviour every single time. To me it looks very random. So it might be a issue with Windows? (in my case: Win10 22H2)

 

Link to comment
Share on other sites

17 hours ago, VolkerMB said:

It is not just Affinity that is affected by the issue. I've just tried to paste a screenshot in a new image using XnViewMP with the same outcome: The three right-most pixel are placed on the left side of the pasted image. However, if I do a second screenshot it gets pasted correctly once in a while. Again, if I copy the incorrectly pasted image from XnViewMP and paste it in Affinity, the offset is gone... Unfortunately I can't reproduce this behaviour every single time. To me it looks very random. So it might be a issue with Windows? (in my case: Win10 22H2)

When this happened, did you directly paste the screenshot into XnViewMP first, or did you try pasting it into Affinity Photo first and then pasting it into XnViewMP?

I think Affinity Photo 2 is doing something with the clipboard.  Try reproducing it without having Affinity Photo open and just pasting directly into XnViewMP.

 

Link to comment
Share on other sites

I did run some tests to verify what I claimed to have discovered... Well, it is complicated...

Test A

  1. Started Firefox and XnViewMP, but not Affinity.
  2. Grabbed a screenshot of the browser.
  3. Created an empty image in XnViewMP and pasted the screenshot in it.
  4. Result: Everyting is displayed correctly.
  5. Started Affinity and pasted screenshot via "new from clipboard"
  6. Result: The screenshot ist broken (by 3 pixels on the left that belong to the right side)

Test B

  1. Started Firefox, XnViewMP and Affinity.
  2. Grabbed a screenshot of the browser.
  3. Created an empty image in XnViewMP and pasted the screenshot in it.
  4. Result: Everything is displayed correctly.
  5. Pasted the same screenshot in Affinity via "new from clipboard".
  6. Result: The screenshot is broken.

Test C

  1. As 1 - 6 in Test B.
  2. Created an empty document of 1920 x 1080 px and pasted the screenshot in it.
  3. Result: still broken.

Test D

  1. Started Firefox, XnViewMP and Affinity.
  2. Grabbed a screenshot of the browser.
  3. Created an empty image in XnViewMP and pasted the screenhot in it.
  4. Copied within XnViewMP the pasted screenshot to the clipboard.
  5. Pasted the image in Affinity via "new from clipboard".
  6. Result: Image looks fine.

So, somehow Affinity treats screenshots made by Windows differently from image data transfered via clipboard from other apps.

 

 

 

Link to comment
Share on other sites

13 minutes ago, VolkerMB said:

Grabbed a screenshot of the browser.

 

11 minutes ago, VolkerMB said:

So, somehow Affinity treats screenshots made by Windows ...

Windows or Firefox?

Being on Mac I have no horse in this race.

Mac Pro (Late 2013) Mac OS 12.7.4 
Affinity Designer 2.4.1 | Affinity Photo 2.4.1 | Affinity Publisher 2.4.1 | 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

On 1/28/2023 at 8:07 PM, VolkerMB said:

…So, somehow Affinity treats screenshots made by Windows differently from image data transfered via clipboard from other apps.

Windows clipboard is more complex than you would think it would be.  I wouldn't read too much into copying from XnViewMP, as it may be copying and pasting clipboard data differently.

I'm thinking the underlying issue is due to some Windows clipboard oddity that hasn't been accounted for in a change made between Affinity Photo 2.0.0 and 2.0.3.  Looking at those three extra pixels in the bottom-left corner, it seems as though that's the start of the bitmap data and there's some bytes of data there that shouldn't be, which is causing it to shift right by three pixels (drawing from left-to-right, bottom-to-top).  Hence why the right side ends up wrapping to the left.

Edit:

I posted an additional video in a post here.

 

Edited by - S -
Added link to an additional video
Link to comment
Share on other sites

Also happens in 2.0.4.

If I copy the window and first do New From Clipboard in Afphoto v1, then Control-A and copy the image from the v1 layer and paste it into v2, the problem doesn't appear.

The problem also doesn't occur if I do screen captures using Greenshot instead of the native Windows screen capture.

Link to comment
Share on other sites

  • 2 months later...

When I use Fireshot with Windows 10 to screen capture anything and paste as New from Clipboard, Affinity Photo 2.0.4 shows only the size of the screen capture as the new image but the area where the image should be is just a transparent grid. Copy and paste from any other photo editing program works just fine. It also works by copying an image to the clipboard from Affinity Photo 1.10.5.1342 or pasting into that version as well.

 

Link to comment
Share on other sites

17 hours ago, ElizabethZ said:

When I use Fireshot with Windows 10 to screen capture anything and paste as New from Clipboard, Affinity Photo 2.0.4 shows only the size of the screen capture as the new image but the area where the image should be is just a transparent grid. Copy and paste from any other photo editing program works just fine. It also works by copying an image to the clipboard from Affinity Photo 1.10.5.1342 or pasting into that version as well.


That's a different clipboard issue to the one in this post; this bug report is specifically about the image data shifting right by three pixels when pasted – causing it to wrap.

Your issue is regarding Affinity Photo pasting a completely blank layer, which is more closely related to the bug report in the link below.

However, your issue is a bit different to that one as well, because in that one it's related to copy and pasting from a document in Affinity Photo, to another document in Affinity Photo, using [Edit > Paste Special] and pasting as "Device Independent Bitmap" or "Device Independent Bitmap V5".

As your case is to do with pasting from Fireshot, it may be worth creating a new topic.  I don't have Fireshot installed, so I'm unable to check whether it's related to the linked topic or not – it's possible Affinity Photo is pasting from Fireshot as a DIB or DIBv5 and so could be related.

The clipboard from Affinity 2.0.3 onwards is pretty broken and it seems that their primary Windows developer has left the company.

 

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