Clipboard loses transparency in Linux

Older bugs which are supposed to be fixed in 0.84. *** Please try to reproduce your bug and confirm the bug fix. ***

Moderators: XnTriq, helmut, xnview, Dreamer

berwyn
Posts: 12
Joined: Tue Aug 08, 2023 12:56 am

Clipboard loses transparency in Linux

Post by berwyn »

Hello,

I want to paste a png with transparency on top of another image using XnView MP under Linux. But when I copy the image into the clipboard it loses its transparency.

It would be sufficient if I could paste a .png file, but XnView has no option for that.

To reproduce this:
* I attach the PNG with transparency.
* Open it.
* Copy it.
* Create a new document with white background and press paste.

It pastes all the transparency pixels as black.
You do not have the required permissions to view the files attached to this post.
User avatar
xnview
Author of XnView
Posts: 43833
Joined: Mon Oct 13, 2003 7:31 am
Location: France

Re: Clipboard loses transparency in Linux

Post by xnview »

could you try to convert it in 32bits, and copy/paste?
Pierre.
berwyn
Posts: 12
Joined: Tue Aug 08, 2023 12:56 am

Re: Clipboard loses transparency in Linux

Post by berwyn »

Actually, no. I specifically had to change the image's color depth to 256 colours in order to be able to edit the alpha color (4,2,4, index 0) to make it transparent in the first place. As I understand it, you're asking me to transform it back to 32-bit. However, if I do that conversion, it just makes the transparent area black. If i then try to copy/paste that into another image, it remains black.
User avatar
xnview
Author of XnView
Posts: 43833
Joined: Mon Oct 13, 2003 7:31 am
Location: France

Re: Clipboard loses transparency in Linux

Post by xnview »

There is an issue when converting 8bits+transparent into 32bits.
You can't copy 8bits+transparency image into clipboard directly.
Pierre.
berwyn
Posts: 12
Joined: Tue Aug 08, 2023 12:56 am

Re: Clipboard loses transparency in Linux

Post by berwyn »

I think you may have linked the wrong issue. Did you mean this issue?

That issue looks likes it's schedule for release in 1.6.2. Is there a way to get a bleeding edge .deb build, or will I need to wait until 1.6.2 is released?

Thanks,
Berwyn
User avatar
xnview
Author of XnView
Posts: 43833
Joined: Mon Oct 13, 2003 7:31 am
Location: France

Re: Clipboard loses transparency in Linux

Post by xnview »

berwyn wrote: Sun Oct 29, 2023 11:39 pm I think you may have linked the wrong issue. Did you mean this issue?

That issue looks likes it's schedule for release in 1.6.2. Is there a way to get a bleeding edge .deb build, or will I need to wait until 1.6.2 is released?
yes sorry, and please wait 1.6.2
Pierre.
berwyn
Posts: 12
Joined: Tue Aug 08, 2023 12:56 am

Re: Clipboard loses transparency in Linux

Post by berwyn »

I have now installed 1.6.4 and this issue is not fixed. I can't change to 32-bit and keep the alpha channel. I open the attached image and select menu Image->Change Color Depth, 32 bits, Alpha 0, Replace alpha for 32bits pictures. Even if I change the Alpha setting to something other than 0 it fails.
You do not have the required permissions to view the files attached to this post.
User avatar
xnview
Author of XnView
Posts: 43833
Joined: Mon Oct 13, 2003 7:31 am
Location: France

Re: Clipboard loses transparency in Linux

Post by xnview »

I can't reproduce, send me the output file?
Pierre.
berwyn
Posts: 12
Joined: Tue Aug 08, 2023 12:56 am

Re: Clipboard loses transparency in Linux

Post by berwyn »

To be perfectly honest, I can't understand the exact meaning of "Replace alpha for 32-bit pictures", so I have provided output with it both checked and unchecked.

I also don't know what to enter for the "Alpha" number, so I have left it at zero. Can you explain both of these fields?

Output results attached.
You do not have the required permissions to view the files attached to this post.
berwyn
Posts: 12
Joined: Tue Aug 08, 2023 12:56 am

Re: Clipboard loses transparency in Linux

Post by berwyn »

Well, that's interesting. When I attach those .png files they look like they have alpha ... even though XnView displays them as black. See attached screenshots comparing display of 8-bit image and 32-bit image.

Even though the 32-bit image appears to have an alpha channel when I paste it into this forum, it doesn't actually work to copy and paste onto another image: it pastes black instead of transparent. See the other two screenshots of me trying to paste it on top of an eclipse, by way of example. It is pasting black instead of Alpha.
You do not have the required permissions to view the files attached to this post.
User avatar
xnview
Author of XnView
Posts: 43833
Joined: Mon Oct 13, 2003 7:31 am
Location: France

Re: Clipboard loses transparency in Linux

Post by xnview »

Your image are in 32bits, but the problem comes from pasting that doesn't use alpha...

:bugconfirmed: Thanks to your detailed description I can reproduce the problem.
Pierre.
berwyn
Posts: 12
Joined: Tue Aug 08, 2023 12:56 am

Re: Clipboard loses transparency in Linux

Post by berwyn »

Thanks. Isn't it also a problem that although the alpha chanel now exists in the 32-bit images, they nevertheless show as all-black in XnView?

Also, are you able to supply a description of what the attached controls mean?
You do not have the required permissions to view the files attached to this post.
User avatar
xnview
Author of XnView
Posts: 43833
Joined: Mon Oct 13, 2003 7:31 am
Location: France

Re: Clipboard loses transparency in Linux

Post by xnview »

This problem is supposed to be fixed in XnView MP 1.6.5. Please check and confirm the bug fix here.
Pierre.