# Image Affine Transformation

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

> Canonical page: https://elysiatools.com/en/tools/image-affine

- **Category:** Design

- **Keywords:** image, affine, transformation, scale, rotate, shear, translate, geometric

## Overview

The Image Affine Transformation tool allows you to precisely manipulate images by applying geometric operations including scaling, rotation, shearing, and translation. This utility provides a straightforward way to adjust image orientation and dimensions while maintaining control over background settings and output quality.

## Inputs

- **Image File** (file): Upload any image file (JPEG, PNG, WebP, GIF, BMP, TIFF) for affine transformation
- **Scale X** (range): Horizontal scaling factor (0.1 to 10.0, 1.0 = original size)
- **Scale Y** (range): Vertical scaling factor (0.1 to 10.0, 1.0 = original size)
- **Rotation Angle** (range): Rotation angle in degrees (-180 to 180, 0 = no rotation)
- **Shear X** (range): Horizontal shearing factor (-2.0 to 2.0, 0 = no shear)
- **Shear Y** (range): Vertical shearing factor (-2.0 to 2.0, 0 = no shear)
- **Translate X** (range): Horizontal translation in pixels (-1000 to 1000, 0 = no translation)
- **Translate Y** (range): Vertical translation in pixels (-1000 to 1000, 0 = no translation)
- **Background Color** (text): Background color for transparent areas (hex #RRGGBB or #RRGGBBAA, or color name)
- **Output Format** (select): Choose output format or keep original. PNG recommended for transparency
- **Quality (1-100)** (number): Output quality for lossy formats (JPEG, WebP). Higher = better quality but larger file size

## When to use

- Correcting the perspective or orientation of scanned documents or photographs.
- Resizing and repositioning image assets for consistent layout design.
- Applying creative geometric distortions like shearing or rotation for graphic projects.

## How it works

- Upload your image file in any supported format such as PNG, JPEG, or WebP.
- Adjust the transformation sliders to set your desired scale, rotation angle, shear, and translation values.
- Specify a background color for empty areas created by the transformation and select your preferred output format.
- Process the image to download your geometrically transformed file.

## Use cases

- Standardizing product photos by rotating and centering them within a fixed frame.
- Creating slanted text or graphic effects for web banners using the shear function.
- Adjusting the scale and position of icons to fit specific UI design requirements.

## Frequently asked questions

### What image formats are supported?

The tool supports JPEG, PNG, WebP, GIF, BMP, and TIFF files.

### Can I make the background transparent?

Yes, by setting the background option to 'transparent' and choosing PNG as your output format.

### What is the maximum file size?

You can upload image files up to 10 MB.

### How does shearing work?

Shearing shifts the image along the X or Y axis, creating a slanted or tilted effect without changing the image's overall area.

### Will I lose quality during transformation?

If you choose JPEG or WebP, you can adjust the quality slider from 1 to 100 to balance file size and visual fidelity.

## Related tools

- [Image Linear Transformation](https://elysiatools.com/en/tools/image-linear): Apply linear transformation (a * input + b) to adjust image levels, brightness, and contrast
- [Image Modulation](https://elysiatools.com/en/tools/image-modulate): Apply modulation transformation for brightness, saturation, and hue adjustments
- [Image Perspective Transformation](https://elysiatools.com/en/tools/image-perspective): Apply perspective transformation for 3D-like effects and perspective correction
- [Image Projective Transformation](https://elysiatools.com/en/tools/image-projective): Apply advanced projective transformation for complex 3D surface mapping and projection effects
- [Image Matrix Recombination](https://elysiatools.com/en/tools/image-recomb): Apply matrix recombination for advanced color space transformations and channel mixing
- [Image Rotate](https://elysiatools.com/en/tools/image-rotate): Rotate images by specified degrees with options for background color and output format
- [Rotate Image by Arbitrary Angle](https://elysiatools.com/en/tools/image-rotate-arbitrary): Rotate images by any arbitrary angle with options for background color and output format
- [Image Flip (Vertical)](https://elysiatools.com/en/tools/image-flip): Flip images vertically (top to bottom) with options for output format and quality

## Samples

- [Web Image Processing Python Samples](https://elysiatools.com/en/samples/web-image-processing-python): Web Python image processing examples using PIL/Pillow including reading, saving, resizing, and format conversion
- [Web Image Processing TypeScript Samples](https://elysiatools.com/en/samples/web-image-processing-typescript): Web TypeScript image processing examples including image read/save, scaling, and format conversion
- [Android Image Processing Java Samples](https://elysiatools.com/en/samples/android-image-processing-java): Android Java image processing examples including reading/saving images, scaling, and format conversion
- [Android Image Processing Kotlin Samples](https://elysiatools.com/en/samples/android-image-processing-kotlin): Android Kotlin image processing examples including reading/saving images, scaling, and format conversion

## Related content

- [Image Geometry Transform Tools](https://elysiatools.com/en/hubs/image-geometry-transform-tools): Choose rotation, flip, crop, affine, perspective, scale, or padding transforms and verify framing, dimensions, orientation, and clean transparent or background edges.
