LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Resize image permanently

I am trying to resize an image permanently without using the zoom factor property. I have looked for different ways and they all send me to the same answer, is there any way to resize an image?.

 

The thing is that i am trying to resize a barcode image dynamically and then use it in a label, so, depending on the size of the label the barcode will adjust to it. The problem come when i resize the barcode image and when i merge it to the label image the resized image appears to its initial size.

0 Kudos
Message 1 of 9
(2,930 Views)

no

Labview 4.0, 5.0, 6.1, 8.6, 2009, 2011, 2012, 2014
If you do not know something, ask me.
0 Kudos
Message 2 of 9
(2,891 Views)

Hi Andres,

 

I am trying to resize an image permanently without using the zoom factor property.

Do you know Image manipulation software like Photoshop (tm) or GIMP?

Do you know how you can resize images with such software?

Either use such a tool to resize your images (there are even tools you can call with SysExec) - or write your own resizing algorithm…

Best regards,
GerdW


using LV2016/2019/2021 on Win10/11+cRIO, TestStand2016/2019
0 Kudos
Message 3 of 9
(2,887 Views)

Image Size can be changed by Increasing/decreasing the Resolution of the Image

 

Share the Image which you want to Process.

----------------------------------------------------------------------------------------------------------------
Palanivel Thiruvenkadam | பழனிவேல் திருவெங்கடம்
LabVIEW™ Champion |Certified LabVIEW™ Architect |Certified TestStand Developer

Kidlin's Law -If you can write the problem down clearly then the matter is half solved.
-----------------------------------------------------------------------------------------------------------------
0 Kudos
Message 4 of 9
(2,869 Views)

Yeah, i think i'll have to make a class on C# and call it from labview

Thanks

0 Kudos
Message 5 of 9
(2,851 Views)

Hi Andres,

 

As the others have hinted at, you can get the image information in the form of a 2D array. After that, it is up to you for how to determine the pixel values of the resized image. Say you double the size in both dimensions, what should the new pixels (between every real pixel) be? The average of its 4 corners is one possibility, but then you have to handle the border differently. If you shrink the image, which pixels do you get rid of? It is not trivial, and will depend on what your images look like.

0 Kudos
Message 6 of 9
(2,842 Views)

You can use image editing software like Adobe Photoshop or GIMP. It allow you to adjust images to fit different dimensions accurately and you can develop a custom resizing algorithm using programming languages like C# to handle the resizing process dynamically. On the other hand you can use any third-party application such as https://jpegcompressor.com/ It compress images efficiently without losing their quality.

0 Kudos
Message 7 of 9
(481 Views)

@AndresPA wrote:

I am trying to resize an image permanently without using the zoom factor property. I have looked for different ways and they all send me to the same answer, is there any way to resize an image?.

 

The thing is that i am trying to resize a barcode image dynamically and then use it in a label, so, depending on the size of the label the barcode will adjust to it. The problem come when i resize the barcode image and when i merge it to the label image the resized image appears to its initial size.


ofcourse you can do that. Read out the image, duplicate all pixels, then duplicate all rows and combine to a new image and you have a 2x rescaled image.

G# - Award winning reference based OOP for LV, for free! - Qestit VIPM GitHub

Qestit Systems
Certified-LabVIEW-Developer
0 Kudos
Message 8 of 9
(465 Views)

Is this what you are trying to do?

Scale Image.png

Message 9 of 9
(454 Views)