Pasting a selection into other programs works differently in XnView MP

Ask for help and post your question on how to use XnView MP.

Moderators: XnTriq, helmut, xnview

TimKraft
Posts: 3
Joined: Mon May 17, 2021 9:28 am

Re: Pasting a selection into other programs works differently in XnView MP

Post by TimKraft »

xnview, thank you for that amazing program!

I also have an issue with clipboard - can't paste selection nowhere (except Krita).

An example with Skype 8.71.0.49.
Image
https://ibb.co/GcWxXjD

Another example with Gimp 2.10.14
Image
https://ibb.co/vZVmpff

I'm using Window 10 Pro
XnView MP Version 0.98.3 64bits (May 6 2021)
TimKraft
Posts: 3
Joined: Mon May 17, 2021 9:28 am

Re: Pasting a selection into other programs works differently in XnView MP

Post by TimKraft »

xnview wrote: Sat Apr 10, 2021 5:54 am It works if you use 'Copy to clipboard>Image'?
Ctrk+Shift+C
It works with Sjype, but not with Gimp :(
User avatar
xnview
Author of XnView
Posts: 45233
Joined: Mon Oct 13, 2003 7:31 am
Location: France

Re: Pasting a selection into other programs works differently in XnView MP

Post by xnview »

TimKraft wrote: Mon May 17, 2021 10:32 am
xnview wrote: Sat Apr 10, 2021 5:54 am It works if you use 'Copy to clipboard>Image'?
Ctrk+Shift+C
It works with Sjype, but not with Gimp :(
it works here with Gimp
Pierre.
TimKraft
Posts: 3
Joined: Mon May 17, 2021 9:28 am

Re: Pasting a selection into other programs works differently in XnView MP

Post by TimKraft »

xnview wrote: Tue May 18, 2021 12:39 pm it works here with Gimp
Indeed, it works now - GIMP 2.10.24
Thank you!
arngard
Posts: 1
Joined: Thu May 04, 2023 1:25 am

Re: Pasting a selection into other programs works differently in XnView MP

Post by arngard »

A lot of time has passed and I'm still suffering from this problem. I think I've figured out what the problem is. You should have paid attention to the last point about flushing the clipboard buffer. My guess is that the MP version does not complete the output stream when it saves an image to the clipboard. The problem people are pointing out in this thread happens when this case:

1. Select the cropped area in the MP version.
2. Ctrl+C.
3. Ctrl+V to Discord or Twitter.

However, if you quit MP after copying, the stream completes and you have a right image in the clipboard, and then when you paste it, you can paste the cropped image as intended.

1. Select the cropped area in the MP version.
2. Ctrl+C.
3. Exit the MP version.
4. Ctrl+V to Discord or Twitter.
m_seitzz
Posts: 12
Joined: Sun Jan 13, 2019 1:01 pm

Re: Pasting a selection into other programs works differently in XnView MP

Post by m_seitzz »

Just wanted to confirm arngard's observation. After copying image data (in the browser or the viewer), I can only successfully paste the image data into Gimp after closing XnView MP.

I tested with XnView MP v1.7.2 x64 and Gimp 2.10.38

I also changed "Copy to clipboard > Image" to CTRL+c and think it should be default like in any other program. XnView is an image viewer after all, so why not copy image data with the universally known CTRL+c by default?
Last edited by m_seitzz on Wed Jul 17, 2024 1:46 pm, edited 1 time in total.
User avatar
user0
XnThusiast
Posts: 2120
Joined: Sat May 09, 2015 9:37 am

Re: Pasting a selection into other programs works differently in XnView MP

Post by user0 »

related
Copying part of image is buggy
and many more..
XnTriq wrote: Tue Dec 26, 2023 6:30 pm
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.
m_seitzz
Posts: 12
Joined: Sun Jan 13, 2019 1:01 pm

Re: Pasting a selection into other programs works differently in XnView MP

Post by m_seitzz »

Still not working in v1.8.2 :shock:

Should I report this as a new bug for it to gain attention? This should be rather easy to fix.
User avatar
xnview
Author of XnView
Posts: 45233
Joined: Mon Oct 13, 2003 7:31 am
Location: France

Re: Pasting a selection into other programs works differently in XnView MP

Post by xnview »

m_seitzz wrote: Tue Oct 29, 2024 8:43 pm Still not working in v1.8.2 :shock:

Should I report this as a new bug for it to gain attention? This should be rather easy to fix.
i can't reproduce on Windows with gimp 2.10 & XnView 1.8.2. How to reproduce?
Pierre.
m_seitzz
Posts: 12
Joined: Sun Jan 13, 2019 1:01 pm

Re: Pasting a selection into other programs works differently in XnView MP

Post by m_seitzz »

Strange that the bug doesn't happen on your PC.

To reproduce:

A) Open any image, select part or all of the image and copy image data.
Paste as new image in GIMP (2.10.38).
=> GIMP shows an error message saying that there is no image data in the clipboard.

B) Now, close XnView MP, and paste as new image in GIMP again.
=> Suddenly, the image data gets pasted correctly.

It seems to only affect GIMP. The image data gets pasted correctly in XnView MP, CopyQ, LibreOffice, Inkscape, KRITA, and paint.net.
I assume that GIMP might adhere more strictly to standards, or fails to interpret certain data as image data. But since closing XnView fixes the problem, XnView must be doing something to the clipboard content when closing that it should have done right away. (see this comment: viewtopic.php?p=187323#p187323)

I'll try to analyse the clipboard content to find out what happens when closing XnView. But I need to find out how and what software I can use...


Edit: I suspect that GIMP is at fault here. Searching for 'GIMP "no image data in the clipboard"' does show that it is a known problem. But ... I don't know if they can fix it.
Last edited by m_seitzz on Wed Oct 30, 2024 6:01 pm, edited 1 time in total.
m_seitzz
Posts: 12
Joined: Sun Jan 13, 2019 1:01 pm

Re: Pasting a selection into other programs works differently in XnView MP

Post by m_seitzz »

Okay, I downloaded "Free Clipboard Viewer" and copied image data in XnView MP, LibreOffice Draw and a Windows screen shot:
all.png
Copying image data in XnView MP does store a lot of different objects in the memory, but so does LibreOffice. However, the image copied from LibreOffice can be inserted as image in GIMP without problems.
Copying in XnView Classic looks like taking a screen shot with the Prnt key.
You do not have the required permissions to view the files attached to this post.
User avatar
xnview
Author of XnView
Posts: 45233
Joined: Mon Oct 13, 2003 7:31 am
Location: France

Re: Pasting a selection into other programs works differently in XnView MP

Post by xnview »

m_seitzz wrote: Wed Oct 30, 2024 3:56 pm A) Open any image, select part or all of the image and copy image data.
Paste as new image in GIMP (2.10.38).
=> GIMP shows an error message saying that there is no image data in the clipboard.
I've tried again, and no issue :?
To copy image data, you use Edit>Copy?
B) Now, close XnView MP, and paste as new image in GIMP again.
=> Suddenly, the image data gets pasted correctly.
it's normal, due to a Qt bug, the data are saved in another way in clipboard
Pierre.
m_seitzz
Posts: 12
Joined: Sun Jan 13, 2019 1:01 pm

Re: Pasting a selection into other programs works differently in XnView MP

Post by m_seitzz »

Again, strange that it doesn't affect everyone.

I tried both "copy" and "copy image content", and both are not working for GIMP.

Idk, maybe it's best to just forget about this. If you can't replicate the bug (in GIMP!), there is no way fixing it. But thanks for looking into it!