11-19-2009 07:31 AM
Hi,
I'm trying to develop a vi that loads a .jpg picture from the hard disk, makes it bigger or smaller according to the zoom factor selected and then adds it to into an existing picture. In short it's a tool to add icons with selected size and position into an existing picture (see the attached vi and picture).
I used the zoom factor property to set the size of the loaded image. But I didn't find a way to insert the zoomed picture into the output picture. Instead I get the loaded picture in the position I chose in the new picture, but in its original size...
Is there some kind of tool/method/property/algorithm I can use to do this operation ?
I think this is not too straight forward so I'd appreciate any help....
Mentos.
Solved! Go to Solution.
11-19-2009 09:52 AM
11-19-2009 11:20 AM
Thanks Darin,
This is exactly what I was looking for!!!
This is indeed a great help.
Much applause!
Mentos
11-23-2009 03:14 AM
Hi Darin,
I need to scale pictures like the one attached to about 10-20 percent of its original size.
When I tried to do this with your vi the resolution I get is too low (I need to print the scaled picture...).
Is there any way I can manipulate this vi to get higher resolution/clear picture when scaling to this small ratios ?
Can I also change this vi to use bmp files ?
BR,
Mentos.
11-23-2009 03:17 AM
11-23-2009 10:06 AM
If you need serious manipulations I suggest a package such as GIMP, this code is meant for simple scaling for bitmaps which will remain at screen resolution. A few suggestions:
Do not try to reduce in one step, for this case I suggest 3 reductions by 0.5 for a final scaling of 0.125. Use a for loop with a shift register.
As for getting things print-quality, remember that your screen is 72-96 dpi and that you will be printing at roughly 300 dpi, unless you are using a program that is designed for this purpose, this conversion does not often end up well for bitmaps.
As for BMP files, no problem, just use Read BMP file instead of Read JPEG, same for PNG. The same flattened data works.
11-23-2009 10:59 AM
Hi Darin,
I'm not familiar with the GIMP package.
Do you have any idea if it can be controled from Labview (via active-x, some kind of driver etc....)?
11-23-2009 11:10 AM
11-23-2009 07:24 PM
It looks like the question was asked in this thread also and answered there.
The subject of this thread is a little misleading. I wouldn't call it magnifying a picture but reducing a picture.