rotates image by 90° about its center in the - plane.


rotates image by θ radians.


rotates a 3D image around the 3D vector w.


gives an image of the specified size.

Details and Options

  • ImageRotate[image,] rotates image about its center.
  • For 2D images, ImageRotate[image,side] rotates image to make the top of the image be on the specified side. ImageRotate[image,side1->side2] rotates image to make side1 be on side2. Possible side specifications are: Top, Bottom, Left, Right.
  • ImageRotate[image,side] is equivalent to ImageRotate[image,Top->side].
  • Possible specifications for size include:
  • widthcrop to width
    {width,height}crop to {width,height}
    {width,depth,height}crop a 3D image to {width,depth,height}
    Automaticsmallest rectangle to enclose all of the rotated image
    Allsmallest square to accommodate the rotated image for any rotation angle
    Fulluse the dimensions of the input image
    "MaxAreaCropping"crop to include only input pixels while maximizing area
    "SameRatioCropping"crop to include only input pixels while preserving ratios
  • The following options are supported:
  • Background0background color to use
    MaskingAllregion of interest to be rotated
    Padding0padding of the original image
    ResamplingAutomaticresampling method
  • Masking option can be one of the following:
  • Allinput image only
    Fullinput image and padding
    maskany mask image


open all close all

Basic Examples  (2)

Rotate an image counterclockwise by 90°:

Click for copyable input

Rotate an image counterclockwise by 20°:

Click for copyable input

Scope  (6)

Options  (5)

Applications  (1)

Properties & Relations  (1)

Interactive Examples  (1)

Introduced in 2008
Updated in 2014