Personal IDL library for M. Galloy

single page | use frames     summary     class     fields     routine details     file attributes



top mg_image_resize

result = mg_image_resize(im, xsize, ysize [, true=long] [, _extra=keywords])

Resize an image similarly to CONGRID. Advantage over CONGRID is that nearest neighbor interpolation is used even for multiple band images.

Return value

the resized image


im in required type=image array

input image array; if the image has multiple bands, use the TRUE keyword to specify which dimension contains the channels

xsize in required type=long

xsize of the output image

ysize in required type=long

ysize of the output image


true in optional type=long

set to specify which dimensions contains the channels; TRUE=0 is for m by n images, TRUE=1 is for 3 by m by n images, TRUE=2 is for m by 3 by n images, TRUE=3 is for m by n by 3 images; default is to guess that the first dimension of size 3 is the number of channels

_extra in optional type=keywords

keywords to CONGRID

File attributes

Modification date: Wed May 14 15:07:15 2014
Lines: 38
Docformat: rst rst
Personal library of Michael Galloy
Contact me if you have enhancement requests or bug fixes.