Categories

Image Affine Transformation

Apply affine transformation for scaling, rotation, shearing, and translation

Click to upload file or drag and drop file here

Maximum file size: 10MB Supported formats: image/jpeg, image/png, image/webp, image/gif, image/bmp, image/tiff

Upload any image file (JPEG, PNG, WebP, GIF, BMP, TIFF) for affine transformation

0.1 1.0 10

Horizontal scaling factor (0.1 to 10.0, 1.0 = original size)

0.1 1.0 10

Vertical scaling factor (0.1 to 10.0, 1.0 = original size)

-180 0 180

Rotation angle in degrees (-180 to 180, 0 = no rotation)

-2 0 2

Horizontal shearing factor (-2.0 to 2.0, 0 = no shear)

-2 0 2

Vertical shearing factor (-2.0 to 2.0, 0 = no shear)

-1000 0 1000

Horizontal translation in pixels (-1000 to 1000, 0 = no translation)

-1000 0 1000

Vertical translation in pixels (-1000 to 1000, 0 = no translation)

Background color for transparent areas (hex #RRGGBB or #RRGGBBAA, or color name)

Choose output format or keep original. PNG recommended for transparency

Output quality for lossy formats (JPEG, WebP). Higher = better quality but larger file size

API Documentation

Request Endpoint

POST /en/api/tools/image-affine

Request Parameters

Parameter Name Type Required Description
imageFile file (Upload required) Yes Upload any image file (JPEG, PNG, WebP, GIF, BMP, TIFF) for affine transformation
scaleX range No Horizontal scaling factor (0.1 to 10.0, 1.0 = original size)
scaleY range No Vertical scaling factor (0.1 to 10.0, 1.0 = original size)
angle range No Rotation angle in degrees (-180 to 180, 0 = no rotation)
shearX range No Horizontal shearing factor (-2.0 to 2.0, 0 = no shear)
shearY range No Vertical shearing factor (-2.0 to 2.0, 0 = no shear)
translateX range No Horizontal translation in pixels (-1000 to 1000, 0 = no translation)
translateY range No Vertical translation in pixels (-1000 to 1000, 0 = no translation)
background text No Background color for transparent areas (hex #RRGGBB or #RRGGBBAA, or color name)
format select No Choose output format or keep original. PNG recommended for transparency
quality number No Output quality for lossy formats (JPEG, WebP). Higher = better quality but larger file size

File type parameters need to be uploaded first via POST /upload/image-affine to get filePath, then pass filePath to the corresponding file field.

Response Format

{
  "filePath": "/public/processing/randomid.ext",
  "fileName": "output.ext",
  "contentType": "application/octet-stream",
  "size": 1024,
  "metadata": {
    "key": "value"
  },
  "error": "Error message (optional)",
  "message": "Notification message (optional)"
}
File: File

AI MCP Documentation

Add this tool to your MCP server configuration:

{
  "mcpServers": {
    "elysiatools-image-affine": {
      "name": "image-affine",
      "description": "Apply affine transformation for scaling, rotation, shearing, and translation",
      "baseUrl": "https://elysiatools.com/mcp/sse?toolId=image-affine",
      "command": "",
      "args": [],
      "env": {},
      "isActive": true,
      "type": "sse"
    }
  }
}

You can chain multiple tools, e.g.: `https://elysiatools.com/mcp/sse?toolId=png-to-webp,jpg-to-webp,gif-to-webp`, max 20 tools.

Supports URL file links or Base64 encoding for file parameters.

If you encounter any issues, please contact us at [email protected]