LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

center image in a display

Solved!
Go to solution

Hi,

 

In my project, I have to display 2D images in a display indicator. I change with succes the zoom factor, so one dimension of the image (the largest) fit with the display. For the other dimension (the smallest) I would like to place the image at the middle of the display.

 

Therefore, I calculate the offset that I need but when I send the offset to the "draw unflattened pixmap" VI, the image is shifted but not exactly on the middle... See the image below:

 

test display.png

 

I attached my VIs :

0 Kudos
Message 1 of 2
(3,101 Views)
Solution
Accepted by topic author llebras

OK sorry, I finally find the errors :

 

- I didnt take into account the zoom factor in the offset calculation. I didn't know that the offset was set according to the pixel in the image, I thought that it was set according to the display length.

 

- I had to recreate my display indicator as if the old one was corrupted by too much manipulations, and there was an additional offset even with the right calculation...

0 Kudos
Message 2 of 2
(3,068 Views)