Copy paste PNG from chrome give black background
Moderators: XnTriq, helmut, xnview
-
- Posts: 6
- Joined: Sun Aug 23, 2015 2:19 pm
Copy paste PNG from chrome give black background
Hello,
I have an issue with XnView and I don't know if there's a solution to it.
It happens when I open a PNG in Chrome and copy the image (right click). Then I paste it (ctrl+shift+v) in XnView and all the transparency is turned to black.
However I can paste the image in, say, powerpoint and there the transparency is properly handled.
Does any body know a solution for this?
Thanks in advance!
I have an issue with XnView and I don't know if there's a solution to it.
It happens when I open a PNG in Chrome and copy the image (right click). Then I paste it (ctrl+shift+v) in XnView and all the transparency is turned to black.
However I can paste the image in, say, powerpoint and there the transparency is properly handled.
Does any body know a solution for this?
Thanks in advance!
-
- XnThusiast
- Posts: 4169
- Joined: Sun Apr 29, 2012 9:45 am
- Location: Cheltenham, U.K.
Re: Copy paste PNG from chrome give black background
I'm no expert on transprency but XnView 'Classic' has this setting you could try:Markhaen wrote:when I open a PNG in Chrome and copy the image (right click). Then I paste it (ctrl+shift+v) in XnView and all the transparency is turned to black.
... while waiting for further help if needed.
You do not have the required permissions to view the files attached to this post.
-
- Posts: 6
- Joined: Sun Aug 23, 2015 2:19 pm
Re: Copy paste PNG from chrome give black background
Thanks for your help!
However I tried that already and it didn't work.
I just tried again checked and not checked and it didn't help...
Any other idea?
Do you guys have the same issue? If you do it with for example this image: https://cdn4.iconfinder.com/data/icons/ ... _2-512.png
However I tried that already and it didn't work.
I just tried again checked and not checked and it didn't help...
Any other idea?
Do you guys have the same issue? If you do it with for example this image: https://cdn4.iconfinder.com/data/icons/ ... _2-512.png
-
- XnThusiast
- Posts: 4169
- Joined: Sun Apr 29, 2012 9:45 am
- Location: Cheltenham, U.K.
Re: Copy paste PNG from chrome give black background
I downloaded your PNG and the 'Alpha' setting below the transparency setting in my sreenshot above has an effect, could you try that?Markhaen wrote:Any other idea?
In the View menu you also have 'Use alpha channel' which I have enabled, although it's greyed out with your image open...
-
- Posts: 6
- Joined: Sun Aug 23, 2015 2:19 pm
Re: Copy paste PNG from chrome give black background
I tried again with "Compose image with alpha (32 bits)" and it does exactly the same.
For me too the 'Use alpha channel' is selected but greyed out...
So you did your test by copying from a chrome tab? I just tried with Internet Explorer and it gives me something similar (although slightly different, but still black background).
For me too the 'Use alpha channel' is selected but greyed out...
So you did your test by copying from a chrome tab? I just tried with Internet Explorer and it gives me something similar (although slightly different, but still black background).
-
- XnThusiast
- Posts: 4169
- Joined: Sun Apr 29, 2012 9:45 am
- Location: Cheltenham, U.K.
Re: Copy paste PNG from chrome give black background
I opened the PNG file you uploaded and tried various settings; I've since opened the file in XnView again (with both of the above settings unselected) and selecting View > Use alpha channel on and off changes the background (displayed striped) from black to grey (on my computer).
If exploring those settings doesn't produce the result you expect, I'm afraid you'll have to wait for the forum's transparency (and alpha) expert...
If exploring those settings doesn't produce the result you expect, I'm afraid you'll have to wait for the forum's transparency (and alpha) expert...
-
- Posts: 6
- Joined: Sun Aug 23, 2015 2:19 pm
Re: Copy paste PNG from chrome give black background
Yeah but what I mean is that if I download the PNG and then open it in XnView it works fine.
My issue is only when copying the image directly from chrome. I have read some things about the clipboard not properly storing the alpha information or I don't know what. But Powerpoint seems to handle that properly though. So XnView should be able too (as it's the best image tool ever ).
My issue is only when copying the image directly from chrome. I have read some things about the clipboard not properly storing the alpha information or I don't know what. But Powerpoint seems to handle that properly though. So XnView should be able too (as it's the best image tool ever ).
-
- XnThusiast
- Posts: 4169
- Joined: Sun Apr 29, 2012 9:45 am
- Location: Cheltenham, U.K.
Re: Copy paste PNG from chrome give black background
I don't use chrome so that's not a test I can easily do, sorry if there's been some confusion.
But the forum's librarian and transparency (and no doubt alpha) expert may be able to help later...
But the forum's librarian and transparency (and no doubt alpha) expert may be able to help later...
-
- Moderator & Librarian
- Posts: 6386
- Joined: Sun Sep 25, 2005 3:00 am
- Location: Ref Desk
Re: Copy paste PNG from chrome give black background
Expert schmeckspertcday wrote:But the forum's librarian and transparency (and no doubt alpha) expert may be able to help later...
This seems to be a known issue with Chrome:
- Google Chrome Help Forum: Drag and Drop Images to Photoshop
- Adobe Community: Pasted transparent PNG files have a black background
- GIMP Forums: Pasted images have black backgrounds
- Super User: Copying PNG with transparency from browser shows a black background instead
Unfortunately, I can't do test with Chrome myself.XnView Wiki (UI-less Settings » [url=http://www.xnview.com/wiki/index.php/UI-less_Settings#Capture]Capture[/url]) wrote:
ImportFormat
- Changes the clipboard format when pasting images from the clipboard or capturing images with the capture tool.
Value: Integer, 0 => CF_BITMAP & CF_DIB, 1 => CF_DIB & CF_BITMAP
Related topics:
-
- Posts: 6
- Joined: Sun Aug 23, 2015 2:19 pm
Re: Copy paste PNG from chrome give black background
Thanks a lot for your thorough investigation!
I tried the ClipboardNewMethod=0 but it didn't change anything.
It seems to be a general issue indeed. However I experience this with Internet Explorer 11 too. And some applications (like MS office and paint.net) handle transparency correctly, so it's possible...
Anyway I will find other workarounds then.
Thanks again for your help anyway.
I tried the ClipboardNewMethod=0 but it didn't change anything.
It seems to be a general issue indeed. However I experience this with Internet Explorer 11 too. And some applications (like MS office and paint.net) handle transparency correctly, so it's possible...
Anyway I will find other workarounds then.
Thanks again for your help anyway.
-
- Moderator & Librarian
- Posts: 6386
- Joined: Sun Sep 25, 2005 3:00 am
- Location: Ref Desk
Re: Copy paste PNG from chrome give black background
BTW: Welcome to the forum, Markhaen
Out of curiosity, I've done some testing with Mozilla Firefox…
Results:
Oddly enough, it works with IE8 on XPMarkhaen wrote:However I experience this with Internet Explorer 11 too.
Out of curiosity, I've done some testing with Mozilla Firefox…
… and the following xnview.ini:[url=http://newsgroup.xnview.com/viewtopic.php?p=121016#p121016]Clipboard Format Spy[/url] ([url=http://cdn4.iconfinder.com/data/icons/medical-website-kit/600/Icon_2-512.png][color=green]Icon_2-512.png[/color][/url]) wrote:Code: Select all
Code | Description | Size -----+-------------------------------+---------- 0002 | CF_BITMAP | - 0008 | CF_DIB | 1.048.616 0011 | CF_DIBV5 | 1.048.700 C009 | DataObject | 4 C013 | Ole Private Data | 152 C134 | application/x-moz-nativeimage | -
Code: Select all
[Cache]
IsActive=0
SavingMode=1
[Capture]
ImportFormat=0/1
[Start]
ClipboardNewMethod=0/1
ParamsSavingMode=1
SavingMode=1
- ImportFormat=0 + ClipboardNewMethod=0 and
ImportFormat=0 + ClipboardNewMethod=1:
transparency is lost - ImportFormat=1 + ClipboardNewMethod=0:
transparency is lost & pHYs chunk is added - ImportFormat=1 + ClipboardNewMethod=1 (default):
alpha channel is preserved & pHYs chunk is added
-
- Posts: 6
- Joined: Sun Aug 23, 2015 2:19 pm
Re: Copy paste PNG from chrome give black background
Thanks XnTriq.
I tried again with ImportFormat=1 + ClipboardNewMethod=1 but it doesn't change anything.
I give up...
I tried again with ImportFormat=1 + ClipboardNewMethod=1 but it doesn't change anything.
I give up...
-
- Moderator & Librarian
- Posts: 6386
- Joined: Sun Sep 25, 2005 3:00 am
- Location: Ref Desk
Re: Copy paste PNG from chrome give black background
Thank you for reporting back!
However, I don't think it's necessarily XnView's fault as I've seen too many clipboard incompatibilities between graphics applications during my tests. I'm wondering if something like “paste special” would be the solution…
See aslo: “Copy image data” loses transparency
Yeah, I'm at my whit's end here, tooMarkhaen wrote:I tried again with ImportFormat=1 + ClipboardNewMethod=1 but it doesn't change anything.
I give up...
However, I don't think it's necessarily XnView's fault as I've seen too many clipboard incompatibilities between graphics applications during my tests. I'm wondering if something like “paste special” would be the solution…
See aslo: “Copy image data” loses transparency
-
- Posts: 21
- Joined: Thu Aug 06, 2015 5:39 pm
Re: Copy paste PNG from chrome give black background
Code: Select all
[Start]
ClipboardNewMethod=0/1
-
- Moderator & Librarian
- Posts: 6386
- Joined: Sun Sep 25, 2005 3:00 am
- Location: Ref Desk
Re: Copy paste PNG from chrome give black background
Yes.uRsti11anError wrote:Is this option absent in Options GUI?
XnView Wiki (UI-less Settings » [url=http://www.xnview.com/wiki/index.php?title=UI-less_Settings#Start]Start[/url]) wrote:
ClipboardNewMethod
- When disabled, XnView will copy alpha channel transparency (32-bit RGBA) as non-premultiplied/unassociated/straight (vs. premultiplied/associated) component (see Transparency – Straight vs. premultiplied alpha).
Value: Boolean (0/1), enabled by default
Added in v2.24