Categories

Image Linear Transformation

Apply linear transformation (a * input + b) to adjust image levels, brightness, and contrast

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 to apply linear transformation

Multiplier value (a). Can be single number for all channels or comma-separated values for each channel. Formula: result = a * input + b

Offset value (b). Can be single number for all channels or comma-separated values for each channel. Formula: result = a * input + b

Apply transformation to specific channels or all channels

Choose output format or keep original

Output quality for lossy formats

Key Facts

Category
Design
Input Types
file, text, select, number
Output Type
file
Sample Coverage
4
API Ready
Yes

Overview

The Image Linear Transformation tool allows you to precisely adjust image brightness, contrast, and color levels by applying the mathematical formula result = a * input + b to your image pixels.

When to Use

  • Correcting underexposed or overexposed photos by adjusting brightness levels.
  • Enhancing image contrast to make details stand out more clearly.
  • Applying specific color channel adjustments to achieve custom artistic effects.

How It Works

  • Upload your image file in a supported format like JPEG, PNG, or WebP.
  • Enter your multiplier (a) and offset (b) values to define the transformation intensity.
  • Select the target channel mode and output format if you wish to convert the file.
  • Process the image to apply the linear transformation and download the adjusted result.

Use Cases

Standardizing brightness across a batch of images for consistent web display.
Recovering details from dark, underexposed photographs using offset adjustments.
Creating high-contrast stylized graphics for design projects.

Examples

1. Brightening Underexposed Photos

Photographer
Background
A set of photos taken in low light appears too dark to use for a portfolio.
Problem
The images lack sufficient brightness and visibility in the shadows.
How to Use
Upload the image and set the multiplier (a) to 1.2 and the offset (b) to 20 to lift the exposure.
Example Config
multiplier: 1.2, offset: 20, channels: all
Outcome
The image brightness is increased, revealing hidden details in the shadows while maintaining overall color balance.

2. Increasing Image Contrast

Graphic Designer
Background
An image looks flat and lacks visual impact for a marketing banner.
Problem
The contrast is too low, making the subject blend into the background.
How to Use
Apply a multiplier (a) of 1.5 to stretch the pixel values, increasing the difference between light and dark areas.
Example Config
multiplier: 1.5, offset: -10, channels: rgb
Outcome
The image gains a sharper, more dramatic look with deeper blacks and brighter highlights.

Try with Samples

image, png, jpg

Related Hubs

FAQ

What does the formula a * input + b do?

The multiplier (a) scales the pixel values to adjust contrast, while the offset (b) shifts the values to adjust overall brightness.

Can I adjust individual color channels?

Yes, you can provide comma-separated values for the multiplier and offset to target specific channels independently.

What file formats are supported?

The tool supports JPEG, PNG, WebP, GIF, BMP, and TIFF formats for input.

Does this tool change the file size?

Yes, especially if you choose a different output format or adjust the quality setting during the transformation.

What is the maximum file size I can upload?

You can upload image files up to 10MB in size.

API Documentation

Request Endpoint

POST /en/api/tools/image-linear

Request Parameters

Parameter Name Type Required Description
imageFile file (Upload required) Yes Upload any image file to apply linear transformation
multiplier text No Multiplier value (a). Can be single number for all channels or comma-separated values for each channel. Formula: result = a * input + b
offset text No Offset value (b). Can be single number for all channels or comma-separated values for each channel. Formula: result = a * input + b
channels select No Apply transformation to specific channels or all channels
format select No Choose output format or keep original
quality number No Output quality for lossy formats

File type parameters need to be uploaded first via POST /upload/image-linear 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-linear": {
      "name": "image-linear",
      "description": "Apply linear transformation (a * input + b) to adjust image levels, brightness, and contrast",
      "baseUrl": "https://elysiatools.com/mcp/sse?toolId=image-linear",
      "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]