LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

how can i read a image from the windows clipboard to a pixmap array in labview

Highlighted
hello,
i want to analyze the actual screen output from a program, this means i need
a
pixmap-array from the actual windows screen. at the time i solve the problem
by using a captureprogram, wich saves the actual screen to a bmp-file, then
i read it again in labview. this solution is very slow and instable and has
high disk load wich is not necessary. i want to grab the screen directly
from windows or
simulate a pressing print key (works) and read from the clipboard (my
problem).
in nidevzone i found a example for labwindows, that allows to read a image
from clipboard into an array, but nothing for labview. and there is a IMAQ
ClipboardToImage function
in the labview help, but i cant find the
function. what to do?
thx for help
0 Kudos
Message 1 of 6
(5,244 Views)
Highlighted
The example from LabWindows may be the answer you need, if this uses WinAPI calls.

This is actually a question for a Microsoft forum. If you can find out how to get the screen capture through WinAPI, you can import the function (usually a DLL) into LabVIEW, and then bring in the bitmap that way.
0 Kudos
Message 2 of 6
(5,244 Views)
Highlighted
I did that. See attached demo.
Actually, I've something even better.
Capture part of the screen which you want
to analyze, and return with flattened
pixmap data directly without go through clipboard.

George Zou
http://gtoolbox.yeah.net
George Zou
Message 3 of 6
(5,244 Views)
Highlighted
GREAT! thank you very much, mr. zou. could you also give me the example how
to capture without clipboard?
its the best because direct way. thx again 🙂



"zou" schrieb im Newsbeitrag
news:506500000005000000F69A0000-1027480788000@exchange.ni.com...
> I did that. See attached demo.
> Actually, I've something even better.
> Capture part of the screen which you want
> to analyze, and return with flattened
> pixmap data directly without go through clipboard.
>
> George Zou
> http://gtoolbox.yeah.net
0 Kudos
Message 4 of 6
(5,244 Views)
Highlighted

Excelent, that code even works in LV2009. Though I found that it does grab whatever is in the clipboard if you hit the print screen button, which is what I was looking to do.

0 Kudos
Message 5 of 6
(2,931 Views)
Highlighted

hello Mr Zou,

 

i have a problem: 

I need to get a window screenprint in jpg compresssed data(not saved as a jpg on HD, just the data, maybe string od U8-array) or just as an Image, i can do compression on my own...

I ´work on Labview 2012 64bit.

 

Do you have any solution or hind for me?

 

Best regards and thank you very much.

Nico

0 Kudos
Message 6 of 6
(2,241 Views)