LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

IMAQ clipboard to picture

Hi to everyone,
 
I am having problems with Vision 6 (I use Labview 6.1)
 
I want to put in a picture indicator the picture from the clipboard that I get by using PrintScreen (or from making Ctrl+V on a picture from my PC)
 
I saw a Vi in Vision 6 that is supposed to do just this: "IMAQ clipboard to picture"
 
My problem is that I don't know to use it, and in help is no reference to any Vi from Vision.
 
First. as an input I have to give it "Picture"!!??!!
 
Secondly that "picture" is a cluster from a string and an unidimentional array!!??? this is worst since all Vi's from Vision need picture info in this format!!??
 
How the hack I use this???
 
Please please help!!!
0 Kudos
Message 1 of 9
(3,829 Views)
Good morning Hapenciuc,

In Vision 6.x, and all versions prior to Vision 7.0, there is no "image" datatype in LabVIEW.  The image data was stored in a cluster with a string and array.  The only way to "see" the image was to use the IMAQ Winddraw function.  I have attached a screenshot of how to use the IMAQ ClipboardtoPicture.VI. 

The first VI called is the IMAQ Create.VI.  This function creates a memory space to store the picture data in.  The next VI, IMAQ ClipboardtoPicture.VI, takes whatever picture is stored to the clipboard, and copies it into the picture passed to it.  The last VI, IMAQ Winddraw.VI, pops open a dialog window that displays the picture that is passed into it.

I hope that this information is helpful!  Please post back with any further questions!

Respectfully,
0 Kudos
Message 2 of 9
(3,819 Views)
Sorry, here's the attachment!

Thanks,
0 Kudos
Message 3 of 9
(3,814 Views)

Thank you very much Jeffrey,

I should have expected some thing like this, but with no example it was harder (immposible) for me to get the job done.

Yet, I stil have a problem wich is not small: why the picture from the WinDraw (and from the BMP file I have save it) is Black and White???

Thank you in anticipation,

Andrew

0 Kudos
Message 4 of 9
(3,806 Views)
Andrew,

The IMAQ Create.VI has an input named Image Type.  It is at the very bottom of the icon and expects an enumerated control/constant to populate it.  I am attaching a screenshot of the options in this enumerated control/constant.  The default value is 8-bit, which means the picture will be black and white.  If you are expecting a color image, you will most likely want to select RGB32 or RGB64.  These values define the bit depth for the pixels in the image!

Respectfully,
0 Kudos
Message 5 of 9
(3,795 Views)
Hi Jeffrey,
 
First I thank you very much for beeing so helpful.
 
I hope this dicutions will help others.
 
I have done as you said. but my problem just changet it's not fixed since the colors are mixt up, more precisely are reversed: blue with red.
Any way this is not my main problem. I need the image info in 3 2D numeric matrix format for RGB. I hoped to extract this info from "Color Palette" but as you can see from the attached picture it is empty.
 
Please elp me again.
 
0 Kudos
Message 6 of 9
(3,787 Views)
Andrew,

I have put together a small VI that should accomplish what you are after.  I am attaching both the VI and a sample image that I used to test the code.  Before running the VI, be sure to copy an image to your clipboard.  The 3 2D array indicators on the front panel should correspond to the red, green, and blue components of each pixel in the original image. 

Respectfully,

Message Edited by Jeffrey P on 10-13-2006 09:12 AM

Download All
0 Kudos
Message 7 of 9
(3,777 Views)
Mr Jeffrey,
 
I don't have words to tell you how happy I am that I got so good help from you.
It is all clear for me know.
I hope some day I'll be able to help someone as much as you did helped me.
 
Best Regards.
 
Andrew
 
0 Kudos
Message 8 of 9
(3,768 Views)
It was no problem Andrew!  Please let me know if you have any further questions!

Regards,
0 Kudos
Message 9 of 9
(3,762 Views)