ImageResize
✖
ImageResize
gives a resized version of image with a maximum pixel width or height given by size.
gives a resized version of image that has exactly the specified pixel width and height.
gives a resized version of a 3D image with the specified dimensions.
Details and Options

- Image resizing changes the pixel dimensions of an image. This is needed when enlarging an image for viewing purposes or creating thumbnails when previewing a collection of images. It is also used to conform collections of images into a common size when batch processing, training, etc.
- ImageResize[image,w] and ImageResize[image,{s}] preserve the original aspect ratio of image.
- Specifications for width, height and depth can be any of the following:
-
d d pixels {d} maximum d pixels Scaled[s] a multiple s of the original size All preserve the original dimension Automatic determine value from aspect ratio Tiny,Small,Medium,Large predefined absolute sizes - ImageResize[image,w] is equivalent to ImageResize[image,{w,Automatic}].
- ImageResize[image,{size}] is equivalent to ImageResize[image,{{size},{size}}].
- To obtain an image with an aspect ratio r, use ImageResize[image,w{1,r}].
- The following options can be given:
-
Padding "Reversed" padding method Resampling Automatic resampling method

Examples
open allclose allBasic Examples (1)Summary of the most common use cases
Scope (5)Survey of the scope of standard use cases
Data (3)
Parameters (2)
Specify the width of the resulting image:

https://wolfram.com/xid/09bu4nkda-52kli1


https://wolfram.com/xid/09bu4nkda-ut7qm2

Use Automatic to explicitly preserve the aspect ratio of the image:

https://wolfram.com/xid/09bu4nkda-9e0erw

Resize an image to have the larger dimension no greater than 200 pixels:

https://wolfram.com/xid/09bu4nkda-ux19w0

Specify both width and height dimensions:

https://wolfram.com/xid/09bu4nkda-7zmetk


https://wolfram.com/xid/09bu4nkda-1zt3to


https://wolfram.com/xid/09bu4nkda-q7qwtv


https://wolfram.com/xid/09bu4nkda-vtgl6l

https://wolfram.com/xid/09bu4nkda-mgg2y3


https://wolfram.com/xid/09bu4nkda-tax7d6


https://wolfram.com/xid/09bu4nkda-fwj9po


https://wolfram.com/xid/09bu4nkda-jgf2iy


https://wolfram.com/xid/09bu4nkda-70nlbd

Options (4)Common values & functionality for each option
Padding (3)
By default, "Reversed" padding is used:

https://wolfram.com/xid/09bu4nkda-gadc3x


https://wolfram.com/xid/09bu4nkda-f1cj4r

When resampling method is set to "Nearest", all padding methods return the same result:

https://wolfram.com/xid/09bu4nkda-p4qnli

With constant padding, the padding value is converted to the color space of the target image:

https://wolfram.com/xid/09bu4nkda-fkt2nl

Applications (3)Sample problems that can be solved with this function

https://wolfram.com/xid/09bu4nkda-tjpimi

Conform and classify a list of day and night images.
Here is an example set containing labeled images of day and night:

https://wolfram.com/xid/09bu4nkda-ephwzg
Calculate the average dimension of the example images:

https://wolfram.com/xid/09bu4nkda-gov82e


https://wolfram.com/xid/09bu4nkda-i8n3du


https://wolfram.com/xid/09bu4nkda-g2chok

Try this classifier on a few test images:

https://wolfram.com/xid/09bu4nkda-jrle11

Get a list of images from the web and then conform them:

https://wolfram.com/xid/09bu4nkda-d3vg1i

Conform dimensions of the list of images:

https://wolfram.com/xid/09bu4nkda-b5m0fa

Conform while imposing an aspect ratio that averages over the images:

https://wolfram.com/xid/09bu4nkda-ijj3bs

Properties & Relations (4)Properties of the function, and connections to other functions
Resampling method "Nearest" is used when increasing the size of an image with only a few pixels:

https://wolfram.com/xid/09bu4nkda-b1cjb2


https://wolfram.com/xid/09bu4nkda-fhhrmt


https://wolfram.com/xid/09bu4nkda-iybnmd

Use ImageResize instead of Size argument in ImageTransformation:

https://wolfram.com/xid/09bu4nkda-duscus

Thumbnail is equivalent to ImageResize using size specification Small and "Fixed" padding:

https://wolfram.com/xid/09bu4nkda-uach1

Importing an image with given ImageSize is equivalent to resizing after Import:

https://wolfram.com/xid/09bu4nkda-zkjcxx

Possible Issues (2)Common pitfalls and unexpected behavior
Downsizing with no interpolation will give poor results for thin objects:

https://wolfram.com/xid/09bu4nkda-xh68t

Use first-order interpolation:

https://wolfram.com/xid/09bu4nkda-hpy7eo

Reducing the size of an image with high-frequency content may result in a moire pattern:

https://wolfram.com/xid/09bu4nkda-bg21ta

https://wolfram.com/xid/09bu4nkda-cufw88

Blur the image to reduce the moire effect:

https://wolfram.com/xid/09bu4nkda-ehlxdi

Wolfram Research (2008), ImageResize, Wolfram Language function, https://reference.wolfram.com/language/ref/ImageResize.html (updated 2021).
Text
Wolfram Research (2008), ImageResize, Wolfram Language function, https://reference.wolfram.com/language/ref/ImageResize.html (updated 2021).
Wolfram Research (2008), ImageResize, Wolfram Language function, https://reference.wolfram.com/language/ref/ImageResize.html (updated 2021).
CMS
Wolfram Language. 2008. "ImageResize." Wolfram Language & System Documentation Center. Wolfram Research. Last Modified 2021. https://reference.wolfram.com/language/ref/ImageResize.html.
Wolfram Language. 2008. "ImageResize." Wolfram Language & System Documentation Center. Wolfram Research. Last Modified 2021. https://reference.wolfram.com/language/ref/ImageResize.html.
APA
Wolfram Language. (2008). ImageResize. Wolfram Language & System Documentation Center. Retrieved from https://reference.wolfram.com/language/ref/ImageResize.html
Wolfram Language. (2008). ImageResize. Wolfram Language & System Documentation Center. Retrieved from https://reference.wolfram.com/language/ref/ImageResize.html
BibTeX
@misc{reference.wolfram_2025_imageresize, author="Wolfram Research", title="{ImageResize}", year="2021", howpublished="\url{https://reference.wolfram.com/language/ref/ImageResize.html}", note=[Accessed: 02-April-2025
]}
BibLaTeX
@online{reference.wolfram_2025_imageresize, organization={Wolfram Research}, title={ImageResize}, year={2021}, url={https://reference.wolfram.com/language/ref/ImageResize.html}, note=[Accessed: 02-April-2025
]}