Skip to main content

Documentation Index

Fetch the complete documentation index at: https://mintlify.com/Adarsh275/Image-Transformation/llms.txt

Use this file to discover all available pages before exploring further.

Image Transformation is a lightweight, dependency-minimal Python command-line tool that lets you apply a full suite of pixel-level image transformations without relying on OpenCV or Pillow for core operations. Every algorithm—from Sobel-filter edge detection to arbitrary-angle rotation—is implemented directly with NumPy arrays, making it easy to understand, extend, and experiment with.

Installation

Set up a virtual environment and install dependencies on Linux, macOS, or Windows in minutes.

Quickstart

Run your first image transformation from the command line in under two minutes.

Command Reference

Explore all 10 available commands with flags, inputs, and real terminal output.

API Reference

Use the imageEdit class directly in your own Python scripts for programmatic access.

What you can do

Image Transformation supports ten distinct operations, each invoked as a subcommand:

Edge Detection

Detect edges using custom Sobel filters implemented in pure NumPy.

Grayscale

Convert images to grayscale using luminosity-weighted averaging.

Invert Color

Produce a photographic negative by bitwise-inverting all pixel values.

Contrast

Enhance contrast using percentile clipping and linear rescaling.

RGB Channels

Isolate one or more RGB channels to inspect color composition.

Transparency

Add an alpha channel and set a custom transparency percentage.

Flip

Mirror an image horizontally with a single NumPy operation.

Rotate

Rotate by any angle with automatic canvas expansion to fit the result.

Upscale

Enlarge an image by an integer factor using pixel repetition.

Downscale

Reduce an image by an integer factor by sampling every Nth pixel.

Getting started

1

Clone and set up the environment

Clone the repository and run the platform-appropriate setup script to create a virtual environment and install dependencies.
git clone https://github.com/Adarsh275/Image-Transformation.git
cd Image-Transformation
bash setup.sh        # Linux / macOS
2

Activate the virtual environment

source venv/bin/activate    # Linux / macOS
3

Run your first transformation

Apply grayscale conversion to any image:
python main.py grayscale Input_Image/mountains.jpg Output_Image/
4

Explore more commands

Run --help to see all available commands and their syntax.
python main.py --help
Output images are automatically named using the source filename plus a suffix describing the transformation applied (e.g., mountains_grayscale.jpg).

Build docs developers (and LLMs) love