Infery.ai
← All tools

Rotate image

Image

image.rotate

in: imageout: image

Rotate image by angle (degrees).

Pricing

Price
0.125 cr / request

Prices in credits (1 credit = $0.01).

Rotate Image

Rotate an image by an arbitrary angle in degrees using the Sharp library.

When to use

  • Fix orientation — correct portrait photos taken sideways (90°, 180°, 270°).
  • Creative angle — apply non-orthogonal rotations (e.g. 15°) for design compositions.
  • Normalize EXIF orientation — rotate and strip EXIF so all consumers see the same orientation.

Inputs & outputs

Input modalityImage file (URL)
Output modalityImage file (GCS URL)
Max input size50 MB
Supported formatsJPEG, PNG, WebP, TIFF, AVIF

Parameters

ParamRequiredDescription
angleyesRotation angle in degrees. Positive = clockwise. Any number accepted (e.g. 45, -30, 270).
backgroundnoHex colour to fill exposed corners after rotation (e.g. #ffffff). Defaults to transparent for PNG, black for JPEG.

Examples

90° clockwise rotation

{
  "type": "image.rotate",
  "input": { "image_url": "gs://infery-prod-media/photos/sideways.jpg" },
  "params": { "angle": 90 }
}

15° tilt with white background fill

{
  "type": "image.rotate",
  "input": { "image_url": "gs://infery-prod-media/photos/product.png" },
  "params": { "angle": 15, "background": "#ffffff" }
}

Pricing

Billed per megapixel of output image. See pricing dashboard for current rates.

Related capabilities

  • image.crop — crop after rotating to remove exposed corners
  • image.flatten — flatten transparency before converting to JPEG
  • image.pipeline — chain rotate with other ops in a single execution

Examples

90° clockwise

{
  "angle": 90
}