Standard Library function that shrinks orexpands an image or array.
col The number of columns to be in the resulting image.
row The number of rows to be in the resulting image.
If nonzero, uses the bilinear interpolation method.
The nearest neighbor interpolation method is not linear, because new values that are needed are merely set equal to the nearest existing value of image. Therefore, when increasing the image size, the result may appear as individual blocks. For more information, see the PV-WAVE User's Guide.
OPENR, lun, !Data_dir + 'mandril.img', /Get_lun mandril_img = BYTARR(512,512) READU, lun, mandril_img new_image = CONGRID(mandril_img, 400, 256) TVSCL, mandril_img ERASE TVSCL, new_image
Figure 2-13 CONGRID has been used to shrink this 512-by-512 mandrill image to one measuring 400-by-256.
Figure 2-14 CONGRID has been used to shrink this 512-by-512 mandrill image to one measuring 400-by-256.
x = DIST(100) new_x = CONGRID(x, 500, 200) TVSCL, x ERASE TVSCL, new_x