Jump to content

Images pasted from remote desktop are shifted 6 pixels right


Recommended Posts

New forum member here - apologies if I'm not posting this in the right place, or in the right way.

I appear to be experiencing a minor bug in Paint.NET v3.5.5 (Final Release build 3.55.3767.28608), on Windows XP SP3 32-bit.

Images I capture (using Ctrl+Alt+Prt Scr) from a remote desktop connection, and then paste into Paint.NET appear to be shifted about six pixels to the right, and the part of the image which should have been a vertical strip six pixels wide along the right hand edge is being drawn along the left hand edge. Here's an example:

83363451.png

This doesn't happen when I take a screenshot in the exact same way but from a widow on my local machine - these render fine:

63439537.png

It also doesn't happen when I take a screenshot from a remote desktop window, and paste it into the regular Windows Paint (MSPaint):

12863240.png

Has this been seen before? Could I be doing something wrong, or does it look like a new bug?

Kind regards,

David Stern

Link to comment
Share on other sites

Oh and I should add I'm planning to fix this for Paint.NET v4. This seems to be a bug in WinForms, so I just need to go direct to the Win32 API instead.

Bit of trivia ... BMP bitmaps, which is what the clipboard uses by convention, are stored upside down*. You'll notice that at the bottom left of the image you pasted, there is a few pixels of giberrish. That's actually part of the BMP file format's header.

* at least, upside down with respect to traditional "memory-correct" row ordering

The Paint.NET Blog: https://blog.getpaint.net/

Donations are always appreciated! https://www.getpaint.net/donate.html

forumSig_bmwE60.jpg

Link to comment
Share on other sites

Oh and I should add I'm planning to fix this for Paint.NET v4. This seems to be a bug in WinForms, so I just need to go direct to the Win32 API instead.

Bit of trivia ... BMP bitmaps, which is what the clipboard uses by convention, are stored upside down*. You'll notice that at the bottom left of the image you pasted, there is a few pixels of giberrish. That's actually part of the BMP file format's header.

* at least, upside down with respect to traditional "memory-correct" row ordering

That's wonderful Rick - many thanks for replying! And I'd not noticed those gibberish pixels before, but absolutely, I see them now. Every day's a schoolday!

Kind regards,

David

Link to comment
Share on other sites

  • 6 years later...

Sorry for necro.

 

For any developers who stumble across this post in future with a similar problem, getting image from clipboard using code on the following blog works around .NET winforms Clipboard.GetImage issue which wraps pixels from the right to the left of the pasted image.

 

https://www.thomaslevesque.com/2009/02/05/wpf-paste-an-image-from-the-clipboard/

 

 

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.

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.

×
×
  • Create New...