Pasting images from the clipboard as files

Hi,

Has anyone come across a situation where an image on the clipboard will not be pasted as a file?

I was trying out Cropper (http://cropper.codeplex.com) the other day and every time I took a screen grab I could not paste it using DOpus. Office's clipboard viewer also fails to show the clipboard contents, although it works if you paste it into e.g. Word.

It seems to be a .NET thing - the functions used to manipulate the clipboard put the normal bitmap, DIB and DIBV5 on there, but also a few other .NET specific things. I was wondering how the DOpus paste worked, whether it only looked at the newest item on the clipboard, and if it did would it be possible to change it somehow?

Thanks.

AFAIK it isn't possible to tell which order the different formats were put on the clipboard (they are put there in one atom operation, effectively).

It could be that the bitmap is in a format Opus (and Office's clipboard viewer) doesn't recognise.

Does it not paste in Opus even if you set Opus to paste in BMP format? With that format Opus may be able to save the clipboard data without having to interpret it. If you can get it into BMP format attach an example file and I'll take a look.

If not I'll make a note to look at Cropper when I get a chance, but since it could also depend on stuff specific to your machine (e.g. screenmode) it would be cool to get a copy of the exact data from the clipboard in case I can't reproduce it later.

Sorry for the very late reply. I appreciate your help, but I've been away recently.

Nope, it won't paste in any format. I'm sure I could get the bitmap out of the clipboard in an unmodified format, but I'll probably need a couple of days to knock something together.

Thanks. I'll try to get the image out of the clipboard and I'll paste it (or a link to it) here.

I don't know if it's related but, FWIW, since I updated my NVidia graphics drivers recently -- at least I assume they are to blame as I updated them around when the problem started and they're involved with screenshots being taken -- I'm finding I sometimes can't paste images either sometimes. It affects multiple apps, not just Photoshop.

Photoshop knows the image dimensions but won't paste them.

The Clipboard Viewer (which I had to copy from an XP machine as it's strangely been removed from Vista) says "there isn't enough memory" when there is plenty.

Sometimes it does work but I only get a black and white image (in both Opus and Photoshop).

Sometimes it works fine.

XP's clipboard viewer is attached in case it's of use. (If you're on XP you can just run "clipbrd.exe" instead.)
clipbrd.zip (46.2 KB)

Thanks for the tip about the clipboard viewer. I've got XP, but didn't know about it. In any case, even it won't show the image on the clipboard and I've found out tonight that it won't paste into OpenOffice either, so it's not just DOpus.

I managed to get the DIB and DIBV5 memory from the clipboard and saved to files (here and here). Those files are OK, but they both use BI_BITFIELDS as the compression.

So I'm left thinking that it's one of the following:

  • The (device dependant) BITMAP on the clipboard is somehow broken - I can check this later.
  • Something has changed in the DIB or DIBV5 that allows me to work with it (new compile) but DOpus doesn't recognise it (already having been compiled). Seems unlikely.
  • DOpus (and all these other tools) only use/check the first format on the clipboard, and because the .NET stuff is mired in decides it's not a bitmap on the clipboard.
  • I've possibly done something different to get the data off the clipboard which works but the method used by everything else doesn't (seems unlikely).

Guess I'll just have to find a non .NET screen grabber :slight_smile: