mike42/gfx-php
gfx-php is a PHP graphics helper library by mike42, aimed at generating and manipulating simple bitmap-style images and drawing primitives. Useful for lightweight image rendering tasks where full GD/Imagick workflows feel too heavy.
This library implements input, output and processing of raster images in pure PHP, so that image processing extensions (Gd, Imagick) are not required.
This allows developers to eliminate some portability issues from their applications.
zlib extension, for reading PNG files.Install gfx-php with composer:
composer install mike42/gfx-php
The basic usage is like this:
<?php
use Mike42\GfxPhp\Image;
$img = Image::fromFile("colorwheel256.png");
$img -> write("test.gif");
examples/ sub-folder for snippets.This project is open to all kinds of contributions, including suggestions, documentation fixes, examples, formats and image processing algorithms.
Some ideas for improvement listed in the issue tracker. Code contributions must be releasable under the LGPLv3 or later.
As a small project, we can't do everything. In particular, gfx-php is not likely to ever perform non-raster operations:
This repository uses test files from other projects:
How can I help you explore Laravel packages today?