Copying part of image is buggy

*** Please report new bugs here! ***

Moderators: XnTriq, helmut, xnview, Dreamer

dexter86
Posts: 16
Joined: Mon Aug 14, 2023 11:30 pm

Copying part of image is buggy

Post by dexter86 »

XnViewMP 1.6.3 and Windows 10

Steps to reproduce:
1. Open any image in viewer mode and select part of it, like this:
Zrzut ekranu 2023-12-26 112932.png
2. Press Ctrl+C or "Edit -> Copy"
3. Open Windows Paint and press Ctrl+V or click Paste, notice that it pasted correctly only that selected fragment.
4. Open https://evercoder.github.io/clipboard-inspector/ and try pasting it there. Notice that it pasted the whole image instead.

The same broken result can be achieved in Discord app when you try to paste it in conversation window, it pastes whole image instead of that fragment.
Zrzut ekranu 2023-12-26 113658.png
Using Clipview from http://www.peterbuettner.de/develop/tools/clipview/ you can see that XnViewMP copies some weird data do clipboard. For example, here's some image fragment copied to clipboard from IrfanView
Zrzut ekranu 2023-12-26 113413.png
And here's from XnViewMP
Zrzut ekranu 2023-12-26 113502.png
You do not have the required permissions to view the files attached to this post.
dexter86
Posts: 16
Joined: Mon Aug 14, 2023 11:30 pm

Re: Copying part of image is buggy

Post by dexter86 »

Found a better software to see clipboard data:
https://www.nirsoft.net/utils/inside_clipboard.html
You can clearly see that there are multiple copy of that image in different formats
Zrzut ekranu 2023-12-26 114416.png
You do not have the required permissions to view the files attached to this post.
User avatar
XnTriq
Moderator & Librarian
Posts: 6402
Joined: Sun Sep 25, 2005 3:00 am
Location: Ref Desk

Re: Copying part of image is buggy

Post by XnTriq »

dexter86 wrote: Tue Dec 26, 2023 10:40 amThe same broken result can be achieved in Discord app when you try to paste it in conversation window, it pastes whole image instead of that fragment.
Confirmed for XnView MP v1.6.3 on Windows 10 Pro 22H2 (64-bit) and these web browsers:
  • Brave v1.61.109
  • Thorium v117.0.5938.157 portable
Related reports:
XnTriq wrote: Tue Jul 22, 2014 5:30 pmFreeware for analyzing clipboard content:
dexter86
Posts: 16
Joined: Mon Aug 14, 2023 11:30 pm

Re: Copying part of image is buggy

Post by dexter86 »

They are right. If I close XnViewMP after copying fragment, then only this is left in clipboard
Zrzut ekranu 2023-12-26 154508.png
You do not have the required permissions to view the files attached to this post.
User avatar
XnTriq
Moderator & Librarian
Posts: 6402
Joined: Sun Sep 25, 2005 3:00 am
Location: Ref Desk

Re: Copying part of image is buggy

Post by XnTriq »

User avatar
user0
XnThusiast
Posts: 2121
Joined: Sat May 09, 2015 9:37 am

Re: Copying part of image is buggy

Post by user0 »

XnTriq wrote: Tue Dec 26, 2023 3:20 pm EditCopy to clipboardImage content (Ctrl+Shift+C) does the trick!
the problem is - 'Image content' shall be copied via CTRL+C command (see other apps)
SHIFT+CTRL+C shall be the advanced one with whatever additional stuff

also, not sure why CF_DIB/CF_DIBV5 have more data once xnviewmp is closed..

clipboard_content.png
test_img_clipboard.zip
You do not have the required permissions to view the files attached to this post.
dexter86
Posts: 16
Joined: Mon Aug 14, 2023 11:30 pm

Re: Copying part of image is buggy

Post by dexter86 »

Ctrl+C should behave in the same manner as IrfanView, that is it should only copy selected fragment and that's it. Every other software behave that way, it's only XnViewMP that does it in this weird way.
User avatar
XnTriq
Moderator & Librarian
Posts: 6402
Joined: Sun Sep 25, 2005 3:00 am
Location: Ref Desk

Re: Copying part of image is buggy

Post by XnTriq »

user0 wrote: Tue Dec 26, 2023 3:57 pmthe problem is - 'Image content' shall be copied via CTRL+C command (see other apps)
SHIFT+CTRL+C shall be the advanced one with whatever additional stuff
I'd also prefer standard behavior.