Skip to main content

Rotate Image

ImageRotate Image

The Rotate Image API rotates an image by a given angle. You send the image as Base64 (docContent), docName, RotationAngle (0–360 degrees), and optionally Backgroundcolor (hex), ProportionateResize, and async. The API returns the rotated image. Use the tester below to try it; more details are in the sections that follow.

Try the Rotate Image API

:::note Quick reference Endpoint: POST /api/v2/RotateImage · Required: api-key, docContent, docName, RotationAngle :::

:::info Try it live Use the form below to send your API key and image (Base64). Set rotation angle (0–360) and optional background color; the response is the rotated image. No code required—fill the fields and click Send request. :::

Loading API Tester...

Overview, parameters, and use cases

What is Rotate Image?

This endpoint rotates an image by a custom angle (0–360 degrees). You provide the image (Base64), docName, RotationAngle, and optionally Backgroundcolor (hex, e.g. #FFFFFF) for areas revealed by rotation, and ProportionateResize to maintain proportions. The API returns the rotated image.

Key features

  • Custom angleRotationAngle in degrees (0–360).
  • BackgroundBackgroundcolor (hex) for corners revealed by rotation.
  • ProportionateResize – Optional proportional resize during rotation.

:::tip Best for Use when you need a specific rotation angle (e.g. 90°, 180°). For auto-rotation from camera EXIF use Rotate Image by EXIF Data; for flipping use Flip Image. :::

Prerequisites

Before using this endpoint, make sure you have:

  • A valid PDF4me API key (Get your API Key)
  • An image file (JPG, PNG, GIF, BMP, TIFF) in Base64 format

Response Format

The API returns an image file with the specified rotation applied.

Get Help