Clipboard loses transparency in Linux
Moderators: helmut, XnTriq, xnview, Dreamer
Clipboard loses transparency in Linux
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.
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.
- Attachments
-
- speedometer-on-transparent.png (13.51 KiB) Viewed 3081 times
Re: Clipboard loses transparency in Linux
could you try to convert it in 32bits, and copy/paste?
Pierre.
Re: Clipboard loses transparency in Linux
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.
Re: Clipboard loses transparency in Linux
There is an issue when converting 8bits+transparent into 32bits.
You can't copy 8bits+transparency image into clipboard directly.
You can't copy 8bits+transparency image into clipboard directly.
Pierre.
Re: Clipboard loses transparency in Linux
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
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
Re: Clipboard loses transparency in Linux
yes sorry, and please wait 1.6.2berwyn 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?
Pierre.
Re: Clipboard loses transparency in Linux
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.
- Attachments
-
- speedometer-on-transparent.png (13.51 KiB) Viewed 2601 times
Re: Clipboard loses transparency in Linux
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.
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.
- Attachments
-
- speedometer-32bit-without-replace-alpha-checked.png (38.37 KiB) Viewed 2550 times
-
- speedometer-32bit-with-replace-alpha-checked.png (38.37 KiB) Viewed 2550 times
Re: Clipboard loses transparency in Linux
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.
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.
Re: Clipboard loses transparency in Linux
Your image are in 32bits, but the problem comes from pasting that doesn't use alpha...
Thanks to your detailed description I can reproduce the problem.

Pierre.
Re: Clipboard loses transparency in Linux
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?
Also, are you able to supply a description of what the attached controls mean?
- Attachments
-
- unknown-controls.png (23.34 KiB) Viewed 2432 times
Re: Clipboard loses transparency in Linux
This problem is supposed to be fixed in XnView MP 1.6.5. Please check and confirm the bug fix here.
Pierre.