A tightly-focused PHP library for performing a very limited set of simple image transformations. This library's purpose is to eschew the standard kitchen sink approach to PHP image libraries in favor of high performance, wide driver support, and a dead simple API.
Find a file
Joby Elliott a92ab71dfd
Update ImagickCLIDriver.php
configurable mogrify path, exceptions on exec() error
2020-10-16 14:01:00 -06:00
examples Saving images pretty much works, switched imagick to use mogrify 2020-10-01 21:48:09 -06:00
src Update ImagickCLIDriver.php 2020-10-16 14:01:00 -06:00
tests/units Saving images pretty much works, switched imagick to use mogrify 2020-10-01 21:48:09 -06:00
.atoum.php starting to add tests 2020-10-01 12:45:56 -06:00
.gitignore some fundamentals are actually working 2020-10-01 16:07:33 -06:00
.travis.yml starting to add tests 2020-10-01 12:45:56 -06:00
composer.json package name! 2020-10-16 12:43:11 -06:00
LICENSE Initial commit 2020-09-30 12:11:50 -06:00
README.md some fundamentals are actually working 2020-10-01 16:07:33 -06:00

image-transform

Build Status Coverage Status

A tightly-focused library for performing a very limited set of simple image transformations. This library's purpose is to eschew the standard kitchen sink approach to PHP image libraries in favor of high performance, wide driver support, and a dead simple API.

Current state

This library is under active development, and until a 1.0 release is made you should expect it to potentially be broken, and unexpectedly and dramatically change its API and functionality. That said, I do have use of this thing for work, so I'm probably going to be working pretty dang hard on it, and hope to have a stable release by about November of 2020.

Current progress

Driver Rotate Mirror Resize Crop Overlay Grayscale Colorize
GD X X X X
Imagick
Gmagick
ImagickCLI X X X X

Roadmap

Drivers

A 1.0 release will not be made until the following drivers are available and solidly tested:

  • GD
  • Imagick
  • Gmagick
  • GmagickCLI

Transforms

A 1.0 release will be made available once the following transforms are available and solidly tested across all drivers. These are basically what I see as the bare minimum for such a library to be useful.

  • orientation
    • rotate (in 90 degree increments)
    • mirror-h
    • mirror-v
  • size
    • fit (basically an alias for max-width and max-height)
    • cover (scale to cover a box, then crop excess)
    • crop (crop toward the center to a given size)
    • cover-crop (convenience transform, combining cover and crop, useful for thumbnails)

More complex, and also lesser used effects/stages that may or may not make it into 1.0

  • color effects
    • grayscale
    • colorize
  • content effects
    • overlay
    • blur
    • hue
    • saturation
    • brightness

Order of operations

In the name of simplicity and ease of use, the effective order of operations will always be as reflected above:

  1. Orientation
  2. Resizing and cropping
  3. Color effects
  4. Content-changing effects