Skip to content

Latest commit

 

History

History
33 lines (24 loc) · 1.27 KB

README.md

File metadata and controls

33 lines (24 loc) · 1.27 KB

Light distortion

Distort big images with low memory needs.

A libvips reimplementation of ImageMagick's multi-points distortion method: shepard's algorithm (source code).

Usage

python3 light-distortion.py <INPUT_FILE> <OUTPUT_FILE> <POINTS>

Example:

python3 light-distortion.py koala.gif output.gif "30,11 20,11  48,29 58,29"
input output
koala output

Corresponding ImageMagick command:

convert koala.gif -distort Shepards '30,11 20,11  48,29 58,29' output.gif

Benchmark

Tested image: png of 129 MB and 5 random distortion couples

ImageMagick Pyvips (light-distortion)
peak memory 4058 MB 160 MB
time 64 seconds 41 seconds