SciPy

scipy.misc.imresize

scipy.misc.imresize(arr, size, interp='bilinear', mode=None)[source]

Resize an image.

Parameters :

arr : ndarray

The array of image to be resized.

size : int, float or tuple

  • int - Percentage of current size.
  • float - Fraction of current size.
  • tuple - Size of the output image.

interp : str

Interpolation to use for re-sizing (‘nearest’, ‘bilinear’, ‘bicubic’ or ‘cubic’).

mode : str

The PIL image mode (‘P’, ‘L’, etc.).

Returns :

imresize : ndarray

The resized array of image.

Previous topic

scipy.misc.imread

Next topic

scipy.misc.imrotate