({{, (RefLink[ImageRotate, paclet:ref/ImageRotate])[image]
rotates image by 90° about its center in the x-y plane. }, {, (RefLink[ImageRotate, paclet:ref/ImageRotate])[image,θ] 
rotates image by θ radians.}, {, (RefLink[ImageRotate, paclet:ref/ImageRotate])[image,{θ,w}]
rotates a 3D image around the 3D vector w.}, {, (RefLink[ImageRotate, paclet:ref/ImageRotate])[image,…,size]
gives an image of the specified size.}})

OpenersNotesSection(Spacer1)Details and Options

(RefLink[ImageRotate, paclet:ref/ImageRotate])[image,…] rotates image about its center.

For 2D images, (RefLink[ImageRotate, paclet:ref/ImageRotate])[image,side] rotates image to make the top of the image be on the specified side. (RefLink[ImageRotate, paclet:ref/ImageRotate])[image,(Subscript[side, 1])->(Subscript[side, 2])] rotates image to make (Subscript[side, 1]) be on (Subscript[side, 2]). Possible side specifications are: (RefLink[Top, paclet:ref/Top]), (RefLink[Bottom, paclet:ref/Bottom]), (RefLink[Left, paclet:ref/Left]), (RefLink[Right, paclet:ref/Right]).

(RefLink[ImageRotate, paclet:ref/ImageRotate])[image,side] is equivalent to (RefLink[ImageRotate, paclet:ref/ImageRotate])[image,(RefLink[Top, paclet:ref/Top])->side].

Possible specifications for size include:

The following options are supported:

(RefLink[Masking, paclet:ref/Masking]) option can be one of the following:

OpenersPrimaryExamplesSection(Spacer1)Examples  (16)

OpenersExampleSection0(Spacer1)Basic Examples  (2)

Rotate an image counterclockwise by 90°:

ImageRotate[]

Rotate an image counterclockwise by 20°:

ImageRotate[,20 °]

OpenersExampleSection1(Spacer1)Scope  (6)

OpenersExampleSubsection0(Spacer1)Data  (3)

Rotate a grayscale image:

ImageRotate[]

Rotate a color image:

ImageRotate[]

Rotate a 3D image in the x-y plane:

ImageRotate[]

OpenersExampleSubsection1(Spacer1)Rotation Angle  (2)

Turn a photo to the right:

ImageRotate[,Right]

Rotate the photo 180°:

ImageRotate[,Left->Right]

Specify the amount of the rotation in radians:

ImageRotate[,π/4]

Rotate the photo by 45°:

ImageRotate[,45°]

By default, the image is rotated around the z axis:

i=;
ImageRotate[i,π/2]

Rotate 3D image around the x axis:

ImageRotate[i,{π/5,{1,0,0}}]

Rotate around the main diagonal:

ImageRotate[i,{π/5,{1,1,1}}]

OpenersExampleSubsection2(Spacer1)Output Size  (1)

By default, padding is used to show the smallest rectangle that encloses all of the rotated image:

i=;

ImageRotate[i,15 °]

Crop to the size of the original image:

ImageRotate[i,15 °,Full]

Crop to the specified width:

ImageRotate[i,15 °,150]

Crop to the input image pixels while preserving aspect ratio:

ImageRotate[i,15 °,"SameRatioCropping"]

Crop to the input image pixels while maximizing area:

ImageRotate[i,15 °,"MaxAreaCropping"]

Crop to the smallest square that accommodates all rotation angles:

ImageRotate[i,#,All]&/@{5 °,45°}

OpenersExampleSection2(Spacer1)Options  (5)

OpenersExampleSubsection3(Spacer1)Background  (1)

By default, a black background is used:

i=;
ImageRotate[i,10 °]

Use a transparent background:

ImageRotate[i,10 °,Background->Transparent]

Use a specific color for the background:

ImageRotate[i,10 °,Background->Gray]

Images with an alpha channel use a transparent background by default:

ImageRotate[SetAlphaChannel[i],10 °]

OpenersExampleSubsection4(Spacer1)Masking  (1)

By default, (RefLink[Masking, paclet:ref/Masking])->(RefLink[All, paclet:ref/All]) is used, and background value is used for pixels outside of the original image:

i=;

ImageRotate[i,20 °, Masking->All]

Use (RefLink[Masking, paclet:ref/Masking])->Full to see padded values for pixels outside of the original image:

ImageRotate[i,20 °, Masking->Full]

Use arbitrary mask:

ImageRotate[i,20 °, Masking->Graphics[{White,Disk[]},Background->Black]]

OpenersExampleSubsection5(Spacer1)Padding  (1)

By default, "Fixed" padding is used:

i=;

ImageRotate[i,20 °, Masking->Full]

Specify the padding scheme:

ImageRotate[i,20 °, Masking->Full,Padding->"Reversed"]

Use a constant padding:

ImageRotate[i,20 °, Masking->Full, Padding->Gray]

OpenersExampleSubsection6(Spacer1)Resampling  (2)

By default, the rotated image is resampled with the most suitable method:

ImageRotate[,20 °]

Rotate an image using a specific resampling algorithm:

ImageRotate[,20 °,Resampling->"Nearest"]

OpenersExampleSection3(Spacer1)Applications  (1)

Switch photo to its natural orientation:

ImageRotate[,90 °]

Rotate an image to correct for upside-down text:

ImageRotate[,Top->Bottom]

OpenersExampleSection4(Spacer1)Properties & Relations  (1)

(RefLink[ImageRotate, paclet:ref/ImageRotate]) performs a rotation about the center:

i=;

ImageRotate[i,20 °,ImageDimensions[i]]

Use (RefLink[ImageTransformation, paclet:ref/ImageTransformation]) and (RefLink[RotationTransform, paclet:ref/RotationTransform]) to rotate the image:

ImageTransformation[i,RotationTransform[-20 °,{0.5,0.5}]]

Rotate about a different center using (RefLink[ImageTransformation, paclet:ref/ImageTransformation]):

ImageTransformation[i,RotationTransform[-20 °,{0,0}]]

Rotate a 3D image around the x-axis:

i=;

ImageRotate[i,{π/5,{1,0,0}},Full]

Use (RefLink[ImageTransformation, paclet:ref/ImageTransformation]) and (RefLink[RotationTransform, paclet:ref/RotationTransform]) to rotate the image:

ImageTransformation[i,RotationTransform[-π/5,{1,0,0},{0.5,0.5,0.5}]]

OpenersExampleSection6(Spacer1)Interactive Examples  (1)

Interactive rotation around the image center with different size settings:

Manipulate[ImageRotate[,θ,size,Background-> White],{{θ,0},-π/2,π/2},{size,{All, Full,"MaxAreaCropping"}}]

({{DocumentationFooterIconsRelatedFunction.png, ({{See Also}, {(RefLink[ImageReflect, paclet:ref/ImageReflect])  ▪  (RefLink[ImageResize, paclet:ref/ImageResize])  ▪  (RefLink[ImagePerspectiveTransformation, paclet:ref/ImagePerspectiveTransformation])  ▪  (RefLink[RotationTransform, paclet:ref/RotationTransform])  ▪  (RefLink[ImageAdjust, paclet:ref/ImageAdjust])  ▪  (RefLink[ImageCrop, paclet:ref/ImageCrop])  ▪  (RefLink[Rotate, paclet:ref/Rotate])}})}})

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

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