LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Resize jpeg picture file.

Hi

How do i resize a jpeg picture (*.jpg) and save it in labview.?

eg. from 800x600 to 640x480.

thanks

Per
0 Kudos
Message 1 of 4
(3,423 Views)
Hi Per,

I did not try, but maybe it works with the "Image resize.vi" at
http://www.geocities.com/gzou999/index.html

Niko
0 Kudos
Message 2 of 4
(3,423 Views)
pmn@digianswer.com (Per) wrote in message news:<2d743cc7.0303030214.6d835901@posting.google.com>...
> Hi
>
> How do i resize a jpeg picture (*.jpg) and save it in labview.?
>
> eg. from 800x600 to 640x480.
>
> thanks
>
> Per

You need to do interpolation. Check out IVision at
www.geocities.com/irene_he/IVision.html
Use the vi "IVision_ResizeImage.vi"
Irene
Irene_he@yahoo.com
www.geocities.com/irene_he
0 Kudos
Message 3 of 4
(3,423 Views)
If you can get by with decimation, the answer is simple.

Anthony de Vries on 8/16/2001 answered this question.

He basically unflattened the flattened image out of the "Read JPEG" and then removed rows and columns from the pixmap matrix to shrink the image. If your JPEG must be arbitrarily scaled (i.e. can't be a 1:2, 1:3, 1:4, etc. decimation), you will have to do as IreneHe suggested and interpolate the values to match "fractional indices" of the new array. You should be able to use the array functions to do this.

After you decimate your pixmap matrix, send it through the flatten function and draw the flattened pixmap to your picture indicator.

I'm sorry I don't have exact function names. I am away from my LabVIEW machine at the moment.
jc
Mac 10.4
LV7.1
CLD
0 Kudos
Message 4 of 4
(3,423 Views)