ni.com is currently undergoing scheduled maintenance.

Some services may be unavailable at this time. Please contact us for help or try again later.

LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Zoom image

Solved!
Go to solution

Bonjour à tous,

 

Je tente depuis 2 jours de faire un zoom sur une image à l'aide d'un curseur et du FactZoom . L'image est mise dans un conteneur à image.

 

Mon problème est que je n'arrive pas à garder mon image centrée dans mon conteneur après modification du FactZoom ...

 

Mon VI est en pièce jointe.

 

Any help ?

 

Merci, Flavien. Smiley Happy

0 Kudos
Message 1 of 5
(4,030 Views)

Procedure:

Image: Get size (right-left) &(bottom-top)

Draw Area: Get size

Origin = top left

calculate centre of draw area

and do maths set centre of image to centre of draw area when zoomed

(requires repositioning origin based on zoom factor)

 

CLD; LabVIEW since 8.0, Currently have LabVIEW 2022 SP1 installed
0 Kudos
Message 2 of 5
(4,024 Views)
Solution
Accepted by Flavien.Rx

Multiply the output of the addition by the reciprocal of the zoom factor:

 

Zoom Attribute_BD.png


GCentral
Message 3 of 5
(4,010 Views)

Thx a lot for your answer !!!

0 Kudos
Message 4 of 5
(3,987 Views)

Thank you for the procedure, helpfull !!!

0 Kudos
Message 5 of 5
(3,986 Views)