LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

How do you scale an image size down to fit window?

Hi, I have the need to show various images on my front panel depending on a user input, how do I load the image so it fits in the confine of my 2d image box? I cant see the zoom the fit option anywhere? m pictures are high resolution, I found an option to resize the box, but nothing to force the image to fit in a designated box without cropping parts off?

0 Kudos
Message 1 of 5
(211 Views)

There is a property node for zoom factor. You can calculate the required factor based on image size and container size.

Message 2 of 5
(181 Views)

@e1rnesto wrote:

Hi, I have the need to show various images on my front panel depending on a user input, how do I load the image so it fits in the confine of my 2d image box? I cant see the zoom the fit option anywhere? m pictures are high resolution, I found an option to resize the box, but nothing to force the image to fit in a designated box without cropping parts off?


 

you may look at the slightly altered .vi from ravensfan from here

you need to scale your input image to the area size of image box

attached as labview 2020

 

 

how to use:

Spoiler
image to rect.gif

 

0 Kudos
Message 4 of 5
(93 Views)

Here's something I found on the board a long time ago

 

ResizePicture.png

========================
=== Engineer Ambiguously ===
========================
Message 5 of 5
(69 Views)