LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Pad an image with zeros

Dear All,
 
I would like to pad an image with different amount of zeros depend on the size of the image. The size of the image is determined by the user choice so it has to be a variable.
 
I can do it using the 'Insert into array' function but not with a variable size of zeros. Does anyone knows how to do it?
 
 
Cheers in advance,
 
 
Eldad
0 Kudos
Message 1 of 3
(2,769 Views)

First off, if you want the padding to be white, you should use 16777215 and not 0, which is black.

Second, what do you mean by "variable"? You can insert as many columns as you like into a 2D array, but in the end they will all be of equal length? Can you specify more about what you're trying to do?


___________________
Try to take over the world!
0 Kudos
Message 2 of 3
(2,760 Views)
I think you should be able to use the initialize array with your maximum possible dimensions. Then use the array subset to select the portion size that is requested. Then use the replace array subset. Show us your code, I'm not really certain I know what you want to accomplish.
0 Kudos
Message 3 of 3
(2,759 Views)