LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Rotating a picture

Solved!
Go to solution

Hi everybody, I'm trying to use this NI example but I don't know how to change the plane that appear when I run the program. I know that comes from the part "airplane image" but don't know how use other image instead of this.

 

Thank you.

0 Kudos
Message 1 of 4
(4,628 Views)
Solution
Accepted by topic author Mtronic
0 Kudos
Message 2 of 4
(4,617 Views)
Solution
Accepted by topic author Mtronic

Hi Mtronic,

 

The airplane image in this example is stored explicitly in the airplane image array as a 24-bit pixmap. In order to substitute the airplane with a different image, you would first need to represent the new image as a 2D pixel array. This can be accomplished using the unflatten pixmap VI in some applications, although the entire Graphics Formats VIs palette may be of use to you, depending on the format of the image you wish to use.

 

Here are some other resources that may be helpful:

What is a pixmap?

Graphics Formats VI Documentation

 

If you have any other questions about this example, feel free to follow up here!

 

Best,

 

Duncan W.

0 Kudos
Message 3 of 4
(4,605 Views)

If you don't mind a .Net dependency (meaning Windows only) I wrote something that can rotate just about any picture, of any file format type, bitness, and supports alpha layers, by a pivot point, and degree, along with window scaling, and its pretty fast.

 

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

 

That whole thread has some good solutions too but mine works with just about any file type you can give it so it is the most developer friendly.

0 Kudos
Message 4 of 4
(4,569 Views)