Copied PNGs have a black background instead of being transparent Topic is solved
Moderator: trava90
Forum rules
This board is for technical/general usage questions and troubleshooting for the Pale Moon browser only.
Technical issues and questions not related to the Pale Moon browser should be posted in other boards!
Please keep off-topic and general discussion out of this board, thank you!
This board is for technical/general usage questions and troubleshooting for the Pale Moon browser only.
Technical issues and questions not related to the Pale Moon browser should be posted in other boards!
Please keep off-topic and general discussion out of this board, thank you!
- jobbautista9
- Keeps coming back
- Posts: 784
- Joined: 2020-11-03, 06:47
- Location: Philippines
- Contact:
Copied PNGs have a black background instead of being transparent
When I try to copy a PNG with a transparent background from Pale Moon, some image editors don't see the transparency and places a black background instead. Currently I've only seen this happen in IrfanView on Wine. Someone on Reddit was complaining about the same problem on Firefox, and they used Google Slides and Photoshop.
Curiously this doesn't happen in GIMP, for some reason.
Can someone who is on Windows test if this also happens in IrfanView and Photoshop?
Relevant bugzilla bug: https://bugzilla.mozilla.org/show_bug.cgi?id=1527235
Testcases: http://pluspng.com/img-png/skeleton-hd-png--350.png, https://bugzilla.mozilla.org/attachment.cgi?id=9043202
Curiously this doesn't happen in GIMP, for some reason.
Can someone who is on Windows test if this also happens in IrfanView and Photoshop?
Relevant bugzilla bug: https://bugzilla.mozilla.org/show_bug.cgi?id=1527235
Testcases: http://pluspng.com/img-png/skeleton-hd-png--350.png, https://bugzilla.mozilla.org/attachment.cgi?id=9043202
merry mimas
XUL add-ons developer. You can find a list of add-ons I manage at http://rw.rs/~job/software.html.
Mima avatar by 絵虎. Pixiv post: https://www.pixiv.net/en/artworks/15431817
Re: Copied PNGs have a black background instead of being transparent
Save the image and it will always retain transparency.
Copying bitmaps with transparency to the clipboard is kind of hit-or-miss, since the native bitmap format for clipboard (DIB) does not support transparency, afaik. So it depends on multiple factors; you could have a PNG stream in the clipboard alongside the DIB to preserve transparency but the program you are pasting in will ALSO have to support that and pick that preferred over DIB. Stuff like that gets convoluted quick so the best way is to just save the PNG to disk and use it that way.
Copying bitmaps with transparency to the clipboard is kind of hit-or-miss, since the native bitmap format for clipboard (DIB) does not support transparency, afaik. So it depends on multiple factors; you could have a PNG stream in the clipboard alongside the DIB to preserve transparency but the program you are pasting in will ALSO have to support that and pick that preferred over DIB. Stuff like that gets convoluted quick so the best way is to just save the PNG to disk and use it that way.
"Sometimes, the best way to get what you want is to be a good person." -- Louis Rossmann
"Seek wisdom, not knowledge. Knowledge is of the past; wisdom is of the future." -- Native American proverb
"Linux makes everything difficult." -- Lyceus Anubite
"Seek wisdom, not knowledge. Knowledge is of the past; wisdom is of the future." -- Native American proverb
"Linux makes everything difficult." -- Lyceus Anubite
-
- Astronaut
- Posts: 660
- Joined: 2014-09-01, 15:11
- Location: Milan Italy
Re: Copied PNGs have a black background instead of being transparent
Confirm on second example (palemoon shows black bkg). Save Image as ...png. GIMP shows checkerboard where transparent, xv shows white.
The reasonable man adapts himself to the world: the unreasonable one persists in trying to adapt the world to himself. Therefore all progress depends on the unreasonable man. (G.B. Shaw)
Re: Copied PNGs have a black background instead of being transparent
Can't confirm. No black bkg in Pale Moon (Win7).
I tested also with two different image software which I use alongside GIMP and the image gets rendered with transparent bkg.
I tested also with two different image software which I use alongside GIMP and the image gets rendered with transparent bkg.
Re: Copied PNGs have a black background instead of being transparent
On Windows some newer versions of programs can recover the transparent info if it is provided in the clipboard data but older applications won't know about it. Still, saving is the BEST solution.
Re: Copied PNGs have a black background instead of being transparent
(I couldn't say if I should be seeing black or white. Anyhow...)
. Win7. Void Image Viewer, IrfanView, & Pale Moon.
(Downloaded &) saved the images, first, then opened, externally. (Except for PM, simply click the link.)
. Win7. Void Image Viewer, IrfanView, & Pale Moon.
(Downloaded &) saved the images, first, then opened, externally. (Except for PM, simply click the link.)
Re: Copied PNGs have a black background instead of being transparent
Like I said it depends on the software you are pasting in.
On Win 10, pasting in paint3d preserves transparency since it understands the datastream that has transparency embedded.
Older software may not, and as a result paste without the alpha layer.
That isn't a browser problem; the browser is putting the data on the clipboard as 32-bit (otherwise no program would be able to pull it transparently from it). I'm pretty sure I made that change in Tycho somewhere.
If you don't get transparency either when saving the image as a png to disk then your viewer is deficient when dealing with transparency
On Win 10, pasting in paint3d preserves transparency since it understands the datastream that has transparency embedded.
Older software may not, and as a result paste without the alpha layer.
That isn't a browser problem; the browser is putting the data on the clipboard as 32-bit (otherwise no program would be able to pull it transparently from it). I'm pretty sure I made that change in Tycho somewhere.
If you don't get transparency either when saving the image as a png to disk then your viewer is deficient when dealing with transparency
"Sometimes, the best way to get what you want is to be a good person." -- Louis Rossmann
"Seek wisdom, not knowledge. Knowledge is of the past; wisdom is of the future." -- Native American proverb
"Linux makes everything difficult." -- Lyceus Anubite
"Seek wisdom, not knowledge. Knowledge is of the past; wisdom is of the future." -- Native American proverb
"Linux makes everything difficult." -- Lyceus Anubite
Re: Copied PNGs have a black background instead of being transparent
As already has been explained, with decent graphic software you should see transparent bkg.
I know that IrfanView is very popular. I used it in the past myself but dumped it many years ago because some of its shortcomings.