How to copy png to clipboard properly
Moderators: helmut, XnTriq, xnview
- Brother Gabriel-Marie
- Posts: 286
- Joined: Thu Aug 23, 2007 2:33 pm
- Location: United States
How to copy png to clipboard properly
So I'm writing an email and I want to display certain png files in my email. I don't want to embed them because I don't want to send hi-res versions. All I want is a nice bmp on the clipboard.
Naturally, I turn to XnView and load up my image there.
However, now I have obstacles.
1. If I copy the png to the clipboard, it does not copy the image like I see it in the image viewer. The copy process loses all the transparency.
2. I can't just take a screenshot of the image in the Image Viewer - it has that checkerboard effect behind it (so I know there is transparency in the image).
I *suppose* that I could hunt through the preferences and disable the checkerboard setting - but that is a pain just to copy one image to clipboard - way more work than I'm interested in.
So what do I do? I do way more work than I want to do anyway and go and post my disappointment on XnView's forum...
Naturally, I turn to XnView and load up my image there.
However, now I have obstacles.
1. If I copy the png to the clipboard, it does not copy the image like I see it in the image viewer. The copy process loses all the transparency.
2. I can't just take a screenshot of the image in the Image Viewer - it has that checkerboard effect behind it (so I know there is transparency in the image).
I *suppose* that I could hunt through the preferences and disable the checkerboard setting - but that is a pain just to copy one image to clipboard - way more work than I'm interested in.
So what do I do? I do way more work than I want to do anyway and go and post my disappointment on XnView's forum...
Re: How to copy png to clipboard properly
Did you use the correct keyboard shortcut (Ctrl+Shift+C), Br. Gabriel-Marie?
- Edit → Copy to clipboard → Image data
- See also: 0.84: Copy Image does not work!
- Brother Gabriel-Marie
- Posts: 286
- Joined: Thu Aug 23, 2007 2:33 pm
- Location: United States
Re: How to copy png to clipboard properly
XnTriq, well, no, in fact, I used the wrong keyboard command - I just used ctrl+c
But in fact, the correct keyboard command *does* work!
So if copy image data copies the actual image, what exactly does plain old copy do?
But in fact, the correct keyboard command *does* work!
So if copy image data copies the actual image, what exactly does plain old copy do?
Re: How to copy png to clipboard properly
Edit → Copy (Ctrl+C) copies the path of (a) seleted file(s) to the clipboard and is used for copying files from one location to another.Brother Gabriel-Marie wrote:So if copy image data copies the actual image, what exactly does plain old copy do?
- Browse mode: cmd_copyFile
- View mode: cmd_copy
- Brother Gabriel-Marie
- Posts: 286
- Joined: Thu Aug 23, 2007 2:33 pm
- Location: United States
Re: How to copy png to clipboard properly
I mean in Image View mode.
When I push ctrl+copy in the Image Viewer it normally copies the image to the clipboard. But it obviously doesn't do the same as copy image data.
When I push ctrl+copy in the Image Viewer it normally copies the image to the clipboard. But it obviously doesn't do the same as copy image data.
Re: How to copy png to clipboard properly
My tests on Windows:
Related: Request: Remove "Copy pathname" and replace it with...
- Open an image in MP's viewer and press Ctrl+C.
- Go to Edit → Import clipboard: Image data is pasted.
- Repeat step #1.
- Switch to the browser, navigate to a different folder and press Ctrl+V: File is pasted.
- Repeat step #1.
- Switch to a file manager, open a folder and press Ctrl+V: File is pasted.
- Repeat step #1.
- Switch to a text editor and press Ctrl+V: File path is pasted.
Related: Request: Remove "Copy pathname" and replace it with...
- Brother Gabriel-Marie
- Posts: 286
- Joined: Thu Aug 23, 2007 2:33 pm
- Location: United States
Re: How to copy png to clipboard properly
XnTriq,
Ah - you miss my point.
I'm not trying to copy and paste files.
Let's try this way.
1. Open a png file in MP's viewer and press ctrl+c
2. Start a new email in Thunderbird, focus the message editor and press ctrl+v
3. Now try that using ctrl+shift+c and ctrl+v
Using ctrl+c to copy the image (not the filename) results in the image copied to the clipboard without transparency
Using ctrl+shift+c to copy the image results in the actual image copied to the clipboard with transparency
In MP, when you use ctrl+c - it copies several things to the clipboard simultaneously - it copies the filename (for pasting into text-only situations) and it copies the image data (bmp, I think). The clipboard is able to store different types of data at the same time. (another example is in MS Word - when you copy text from there, both the rich text is copied AND the plain text is copied, too).
I was just surprised that the image was copied without transparency when I used ctrl+c.
Ah - you miss my point.
I'm not trying to copy and paste files.
Let's try this way.
1. Open a png file in MP's viewer and press ctrl+c
2. Start a new email in Thunderbird, focus the message editor and press ctrl+v
3. Now try that using ctrl+shift+c and ctrl+v
Using ctrl+c to copy the image (not the filename) results in the image copied to the clipboard without transparency
Using ctrl+shift+c to copy the image results in the actual image copied to the clipboard with transparency
In MP, when you use ctrl+c - it copies several things to the clipboard simultaneously - it copies the filename (for pasting into text-only situations) and it copies the image data (bmp, I think). The clipboard is able to store different types of data at the same time. (another example is in MS Word - when you copy text from there, both the rich text is copied AND the plain text is copied, too).
I was just surprised that the image was copied without transparency when I used ctrl+c.
Re: How to copy png to clipboard properly
Exactly. I tried to illustrate this bahavior in my previous post.Brother Gabriel-Marie wrote:In MP, when you use ctrl+c - it copies several things to the clipboard simultaneously - it copies the filename (for pasting into text-only situations) and it copies the image data (bmp, I think).
Brother Gabriel-Marie wrote:I was just surprised that the image was copied without transparency when I used ctrl+c.

There was a similar discussion a while back, …
- Copy paste PNG from chrome give black background
- “Copy image data” loses transparency
- Bug: Copy image to clipboard doesn't work anymore ...
logo.png @ XnView MP v0.84 x32:
Browse mode → [color=green]Ctrl+Shift+C[/color] wrote:Code: Select all
Format | Format Name | Handle Type | Size | Index -------+-------------------------+-------------+--------+------ 17 | CF_DIBV5 | Memory | 55'204 | 1 8 | CF_DIB | Memory | 41'656 | 2 49566 | image/png | Memory | 8'341 | 3 49567 | image/bmp | Memory | 41'670 | 4 49568 | image/cur | Memory | 57'182 | 5 49569 | image/dds | Memory | 55'208 | 6 49571 | image/icns | Memory | 5'237 | 7 49572 | image/ico | Memory | 57'182 | 8 49573 | image/jpeg | Memory | 1'966 | 9 49574 | image/jpg | Memory | 1'966 | 10 49575 | image/pbm | Memory | 1'745 | 11 49576 | image/pgm | Memory | 13'785 | 12 49577 | image/ppm | Memory | 41'325 | 13 49581 | image/tif | Memory | 55'286 | 14 49582 | image/tiff | Memory | 55'286 | 15 49583 | image/wbmp | Memory | 1'739 | 16 49584 | image/xbm | Memory | 8'967 | 17 49585 | image/xpm | Memory | 39'784 | 18
View mode → [color=green]Ctrl+C[/color] wrote:Code: Select all
Format | Format Name | Handle Type | Size | Index -------+-------------------------+-------------+--------+------ 17 | CF_DIBV5 | Memory | 55'204 | 1 8 | CF_DIB | Memory | 41'656 | 2 15 | CF_HDROP | Memory | 46 | 3 49395 | UniformResourceLocatorW | Memory | 40 | 4 49376 | UniformResourceLocator | Memory | 19 | 5 13 | CF_UNICODETEXT | Memory | 24 | 6 1 | CF_TEXT | Memory | 17 | 7 49566 | image/png | Memory | 8'341 | 8 49567 | image/bmp | Memory | 41'670 | 9 49568 | image/cur | Memory | 57'182 | 10 49569 | image/dds | Memory | 55'208 | 11 49571 | image/icns | Memory | 5'237 | 12 49572 | image/ico | Memory | 57'182 | 13 49573 | image/jpeg | Memory | 1'966 | 14 49574 | image/jpg | Memory | 1'966 | 15 49575 | image/pbm | Memory | 1'745 | 16 49576 | image/pgm | Memory | 13'785 | 17 49577 | image/ppm | Memory | 41'325 | 18 49581 | image/tif | Memory | 55'286 | 19 49582 | image/tiff | Memory | 55'286 | 20 49583 | image/wbmp | Memory | 1'739 | 21 49584 | image/xbm | Memory | 8'967 | 22 49585 | image/xpm | Memory | 39'784 | 23
Re: How to copy png to clipboard properly
But 'copy' copy transparency too into clipboard, on which software do you paste it?Brother Gabriel-Marie wrote: I was just surprised that the image was copied without transparency when I used ctrl+c.
Ctrl+C add a HDROP (files) to clipboardMe too, and that's why I'd like to find out why Ctrl+C loses the transparency while
Pierre.
- Brother Gabriel-Marie
- Posts: 286
- Joined: Thu Aug 23, 2007 2:33 pm
- Location: United States
Re: How to copy png to clipboard properly
Pierre, I usually copy into the Thunderbird message composer.
Re: How to copy png to clipboard properly
i'll test, in LibreOffice/Paint.net for example, the paste is correctBrother Gabriel-Marie wrote:Pierre, I usually copy into the Thunderbird message composer.
Pierre.
Re: How to copy png to clipboard properly
What's your configuration of clipboard.paste_image_type, Br. Gabriel-Marie?
- MozillaZine Knowledge Base
- Creating complex mails with inline images → Copy & paste images
- about:config
- clipboard.paste_image_type
- Mozilla Add-ons