LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Picture

Hi everybody!!
Help me.

I'm trying to resize a picture loaded from a .JPG.
I have a picture control on the panel and the size of the picture (JPG) is
too big.

How can I do?

Any issues...

Bye, bye thanks in advance.
0 Kudos
Message 1 of 4
(3,117 Views)
Hi,

1) Get size of JPG image and size of picture control.
2) Calculate 2 rates:
WR=JPG_Width/Pict_Width
HR=JPG_Height/Pict_Height
3)Create 2 for loops and get from JPG image only values that founds on places (m*HR,n*WR) where m,n are coordinates of picture control pixel.

I think it must work.

n_chernin@hotmail.com
0 Kudos
Message 2 of 4
(3,117 Views)
Ok! you're right!

I never will found this solution...
Thank you very much.


"Nadav Chernin" ha scritto nel messaggio
news:50650000000500000003AD0000-1031838699000@exchange.ni.com...
> Hi,
>
> 1) Get size of JPG image and size of picture control.
> 2) Calculate 2 rates:
> WR=JPG_Width/Pict_Width
> HR=JPG_Height/Pict_Height
> 3)Create 2 for loops and get from JPG image only values that founds on
> places (m*HR,n*WR) where m,n are coordinates of picture control pixel.
>
> I think it must work.
>
> n_chernin@hotmail.com
0 Kudos
Message 3 of 4
(3,117 Views)
If you are on Windows you can try the attached VI.

The technique uses the ActiveX web browser to display the resized image in an html file. Then the image of the browser control is copy to a picture control. Use the picture functions to strip only the required area of the picture.


LabVIEW, C'est LabVIEW

0 Kudos
Message 4 of 4
(3,117 Views)