From Friday, April 19th (11:00 PM CDT) through Saturday, April 20th (2:00 PM CDT), 2024, ni.com will undergo system upgrades that may result in temporary service interruption.

We appreciate your patience as we improve our online experience.

BreakPoint

cancel
Showing results for 
Search instead for 
Did you mean: 

LV Picture Control

How about a more full featured version hurling NI Eagles at stacks of PXI and cRIO units? 😄

 

(Of course the NI lawyers might take offense in abusing trademarked graphics, but it might be OK under the parody excemption of fair use.)

0 Kudos
Message 51 of 57
(6,076 Views)

 I've tried to change the image control to rotate anothe image, but after I change the control and the property node the VI doesn't rotate the image. Is there something I'm missing to get the image to rotate?

 

I've attached my code and the new image I want to rotate.

 

Thanks!

 

Download All
0 Kudos
Message 52 of 57
(5,023 Views)

Altenbach can speak to his specific implementation, but if you don't mind having .Net as a dependency, I posted some code here, that can rotate an arbitrary image at various horizontal and vertical points with various modes.  It works with your PNG image.

 

http://forums.ni.com/t5/LabVIEW/How-to-rotate-objects-or-pictures-on-my-FP/m-p/3200578#M927937

Message 53 of 57
(5,009 Views)

Thank you! I'll play around with it. Is there a way to get rid of the gray background of the picture? My original file doen's have a background. 

 

Thanks!

0 Kudos
Message 54 of 57
(5,002 Views)

All you did was paste your image into the front panel. You need to read your file, unflatten it (it is 24bit, so use a different output when unflattening) and feed it into the machinery.

 

However, at 2400x2400, your picture is way too big. Make it 10x smaller in each dimension.

 

 

Message 55 of 57
(4,997 Views)

Thanks for your quick response. This really helps! I appreciate it!

0 Kudos
Message 56 of 57
(4,987 Views)

The size of the image is not a problem for the .Net method, of course it is a slower than it would be on a smaller image.  The current image can be resized and rotated at about 8 times a second on my computer.  

 

As for the grey background that is because the pane that the picture box is in is grey.  My method supports alpha layers, and will apply them to the picture shown.  Since the background is grey, this is used on the image.  To change the background color, resize the control to make it smaller, so you can see the pane it is in.  Color it with the LabVIEW color tool, then right click the control and fit it to the pane again.  Now when it runs the background will be the color of the pane that you just picked.

Message 57 of 57
(4,979 Views)