LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

how do you place a picture in another picture

Solved!
Go to solution
Solution
Accepted by topic author Jim12345678

Yes.  There is a function to do what you want.

 

pip.png

 

 

Convert a big picture to array takes time.

 

George Zou
0 Kudos
Message 11 of 21
(1,558 Views)

Here's probably all you really need (currently using fixed H position, but that can easily be changed, of course):

 

altenbach_0-1659386446313.png

 

0 Kudos
Message 12 of 21
(1,548 Views)

Thank you.  This does all the array conversions for me and is a much simpler implementation.

0 Kudos
Message 13 of 21
(1,534 Views)

This is so cool! This should be one of the best answers. Come on Jim1234!

0 Kudos
Message 14 of 21
(1,524 Views)

What are the names of the four blocks you are using there? I want to find them.

0 Kudos
Message 15 of 21
(1,523 Views)

@GRCK5000 wrote:

What are the names of the four blocks you are using there? I want to find them.


For a picture like this (with dotted line, LabVIEW version#, ...) :

pip.png

https://forums.ni.com/t5/LabVIEW/how-do-you-place-a-picture-in-another-picture/m-p/4246798?lightbox-...

 

you can simply download the image, and drag & drop on a diagram.

It will be converted to diagram automatically.

The diagram is embedded inside the image.

 

George Zou
0 Kudos
Message 16 of 21
(1,512 Views)

Thanks for sharing this info, George!. I always wonder why people post pictures instead of attaching a block diagram. 

0 Kudos
Message 17 of 21
(1,502 Views)

@GRCK5000 wrote:

Thanks for sharing this info, George!. I always wonder why people post pictures instead of attaching a block diagram. 


I typically show a picture AND attach a VI (see here). Good enough? 😄

 

While snippets are OK for very (very!) simple code, they lose a lot of metadata compared to the actual VI (e.g. settings, connector pane assignment, etc.).

 

Note that George's code still does the expensive dance from picture data to 2D array and immediately back to picture data. Flatten/unflatten an image just to change a few scalar cluster elements is obviously not needed and my code bypasses it completely. Definitely more efficient! Have you tried?

0 Kudos
Message 18 of 21
(1,493 Views)

Yes. if both images are constant, you can do the convert before enter the loop.

 

George Zou
0 Kudos
Message 19 of 21
(1,479 Views)

My point was that you can operate on the pink cluster to adjust the position. No need to do the detour over the blue 2D array (inside or outside the loop) 😄

0 Kudos
Message 20 of 21
(1,469 Views)