12-06-2013 11:25 AM
Can anyone give me a starting idea so that my bitmap object gets scalled down when i zoom in on the image and vice versa instead of maintaining its origional size ??
12-06-2013 02:28 PM
Can you post a snippet of your code? I guess you are refferring to an Image Display control. But I do not see any relation to your post.
12-08-2013 05:03 AM
I have attached a vi where i am trying to display a customized point as an overlay over an image. But as i zoom out of the image the point starting getting disappear, now is there anyway i can make it scale up as i zoom out and vice versa
12-08-2013 05:24 AM
Never had this desire. Using a property node to read the ZoomInteger or ZoomSingle of the Image Display would be my approach. Use these values to resize the bitmap before overlaying it.
12-08-2013 05:30 AM
Actually a desire which is to be part of my project 😞 .... Zoom single just provides the zooming capability in programming but it has no effect on overlay scaling. I found similar approach in overlay text which has built in scaling capability. Can same capability be introduced in bitmap overlay ??
12-08-2013 05:34 AM
It seems that you are right with the behaviour of ZoomSingle. However, ZoomInteger tells you the current zoom selection of the Image Display. With this information you should be able to scale your bitmap according to your desire.
12-08-2013 05:48 AM
How to scale thats the origional question ??
12-08-2013 06:00 AM
If your bitmap was an IMAQ image, I would use IMAQ Resample.
Don't know if a counterpart for this VI exsist in LabVIEW for a 2D array ...
12-08-2013 06:17 AM
The imaq resample does reshapes the image but according to another image not according to zoom level. The difference is X,Y resolution remains same in the case of zoom based scaling which makes imaq resample not the block for the case.
12-08-2013 06:50 AM
That's one option on how to use IMAQ Resample.
Let me put some draft code here. That might avoid lots of posts regarding what I have in mind.
I have pasted the the FP after one VI run above the code. You can see, that the small red cross increased in size to 25 x 25 in the Image Display. As transparent pixels in the bitmap were not kept in the alpha channel, I simply used a For Loop in a For Loop to correct this
Now its up to you to set the numeric value (instead of my BD constant which is set to 25) according to your desire. And do not forget to clean up things, like IMAQ Dispose (which I did not here in the draft).