({{, (RefLink[ImageResize, paclet:ref/ImageResize])[image,width] 
gives a resized version of image that is width pixels wide.}, {, (RefLink[ImageResize, paclet:ref/ImageResize])[image,{s}]
gives a resized version of image with a maximum pixel width or height given by s.}, {, (RefLink[ImageResize, paclet:ref/ImageResize])[image,{width,height}]
gives a resized version of image that has exactly the specified pixel width and height.}, {, (RefLink[ImageResize, paclet:ref/ImageResize])[image,{width,depth,height}]
gives a resized version of a 3D image with the specified dimensions.}})

OpenersNotesSection(Spacer1)Details and Options

(RefLink[ImageResize, paclet:ref/ImageResize])[image,w] and (RefLink[ImageResize, paclet:ref/ImageResize])[image,{s}] preserve the original aspect ratio of image.

Specifications for width, height and depth can be any of the following:

(RefLink[ImageResize, paclet:ref/ImageResize])[image,w] is equivalent to (RefLink[ImageResize, paclet:ref/ImageResize])[image,{w,(RefLink[Automatic, paclet:ref/Automatic])}].

(RefLink[ImageResize, paclet:ref/ImageResize])[image,{s}] is equivalent to (RefLink[ImageResize, paclet:ref/ImageResize])[image,{{s},{s}}].

To obtain an image with an aspect ratio r, use (RefLink[ImageResize, paclet:ref/ImageResize])[image,w{1,r}].

The following options can be given:

OpenersPrimaryExamplesSection(Spacer1)Examples  (14)

OpenersExampleSection0(Spacer1)Basic Examples  (1)

Resize an image to be 100 pixels wide:

ImageResize[, 100]

OpenersExampleSection1(Spacer1)Scope  (4)

OpenersExampleSubsection0(Spacer1)Data  (2)

Resize a grayscale image:

ImageResize[,70]

Resize a 3D image:

ImageResize[,32]

OpenersExampleSubsection1(Spacer1)Parameters  (2)

Specify the width of the resulting image:

i=;
ImageResize[i,100]

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

ImageResize[i,{100}]

ImageDimensions[%]

Specify both width and height dimensions:

ImageResize[i,{100,75}]

Resize by a factor of 1/2:

ImageResize[i,Scaled[1/2]]

Use (RefLink[Automatic, paclet:ref/Automatic]) to explicitly preserve the aspect ratio of the image:

ImageResize[i,{Automatic,100}]

Resize in one dimension only:

ImageResize[i,{All,50}]

Specify a named size:

ImageResize[i,Small]

Resize a 3D image in one dimension only:

ImageResize[,{All,All,64}]

Specify all three dimensions:

ImageResize[,{Scaled[1/2],Scaled[1/2],32}]

OpenersExampleSection2(Spacer1)Options  (3)

OpenersExampleSubsection2(Spacer1)Padding  (2)

By default, "Reversed" padding is used:

ImageResize[,Scaled[2]]//ImageData//MatrixForm

With the default (RefLink[Resampling, paclet:ref/Resampling])->"Nearest", all padding methods return the same result:

ImageResize[,Scaled[2],Padding->"Periodic"]//ImageData//MatrixForm

For all other resampling methods, different padding methods may return different results:

ImageResize[,Scaled[2],Resampling->"Linear"]//ImageData//MatrixForm

Use "Periodic" padding:

ImageResize[,Scaled[2],Resampling->"Linear",Padding->"Periodic"]//ImageData//MatrixForm

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

ImageResize[,{6,6},Resampling->"Linear",Padding->Red]===ImageResize[,{6,6},Resampling->"Linear",Padding->ColorConvert[Red,"Gray"]]

OpenersExampleSubsection3(Spacer1)Resampling  (1)

By default, "Nearest" resampling method is used when increasing the size of an image:

ImageResize[,{9,9}]

Use bilinear resampling:

ImageResize[,{9,9},Resampling->"Linear"]

OpenersExampleSection3(Spacer1)Applications  (1)

Create a small image thumbnail:

ImageResize[,Small]

OpenersExampleSection4(Spacer1)Properties & Relations  (3)

Use (RefLink[ImageResize, paclet:ref/ImageResize]) instead of Size argument in (RefLink[ImageTransformation, paclet:ref/ImageTransformation]):

i=; 
ImageTransformation[i,RotationTransform[10°],100]==
ImageResize[ImageTransformation[i,RotationTransform[10 °]],100,Resampling->"Linear"]

(RefLink[Thumbnail, paclet:ref/Thumbnail]) is equivalent to (RefLink[ImageResize, paclet:ref/ImageResize]) using some predefined sizes:

i=;
Thumbnail[i]==ImageResize[i,Small,Padding->"Fixed"]

Importing an image with given (RefLink[ImageSize, paclet:ref/ImageSize]) is equivalent to resizing after (RefLink[Import, paclet:ref/Import]):

Import["ExampleData/rose.gif",ImageSize->Medium]==ImageResize[Import["ExampleData/rose.gif"],Medium]

OpenersExampleSection5(Spacer1)Possible Issues  (2)

Downsizing with no interpolation will give poor results for thin objects:

i=;
ImageResize[i,80,Resampling->"Nearest"]

Use first-order interpolation:

ImageResize[i,80,Resampling->"Linear"]

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

i=;

ImageResize[i,Scaled[0.5],Resampling->"Linear"]

Blur the image to reduce the moire effect:

ImageResize[MeanFilter[i,1],Scaled[0.5],Resampling->"Linear"]

({{DocumentationFooterIconsRelatedFunction.png, ({{See Also}, {(RefLink[Thumbnail, paclet:ref/Thumbnail])  ▪  (RefLink[ImageRotate, paclet:ref/ImageRotate])  ▪  (RefLink[ImageCrop, paclet:ref/ImageCrop])  ▪  (RefLink[ImageTake, paclet:ref/ImageTake])  ▪  (RefLink[ImagePad, paclet:ref/ImagePad])  ▪  (RefLink[ImageDimensions, paclet:ref/ImageDimensions])  ▪  (RefLink[ImageSize, paclet:ref/ImageSize])  ▪  (RefLink[ImagePyramid, paclet:ref/ImagePyramid])  ▪  (RefLink[SpatialTransformationLayer, paclet:ref/SpatialTransformationLayer])}})}})

({{DocumentationFooterIconsRelatedTutorial.png, ({{Tutorials}, {▪(RefLinkPlain[Image Processing, paclet:tutorial/ImageProcessing])}})}})

({{DocumentationFooterIconsRelatedGuide.png, ({{Related Guides}, {▪(RefLinkPlain[Basic Image Manipulation, paclet:guide/BasicImageManipulation])}, {▪(RefLinkPlain[Image Processing & Analysis, paclet:guide/ImageProcessing])}, {▪(RefLinkPlain[Geometric Operations, paclet:guide/ImageGeometry])}, {▪(RefLinkPlain[3D Images, paclet:guide/3DImages])}, {▪(RefLinkPlain[Computational Photography, paclet:guide/ComputationalPhotography])}})}})