ronald 713940b89d first commit 11 ماه پیش
..
docs 713940b89d first commit 11 ماه پیش
example 713940b89d first commit 11 ماه پیش
src 713940b89d first commit 11 ماه پیش
test 713940b89d first commit 11 ماه پیش
.coveralls.yml 713940b89d first commit 11 ماه پیش
.gitignore 713940b89d first commit 11 ماه پیش
.travis.yml 713940b89d first commit 11 ماه پیش
LICENSE 713940b89d first commit 11 ماه پیش
README.md 713940b89d first commit 11 ماه پیش
composer.json 713940b89d first commit 11 ماه پیش
composer.lock 713940b89d first commit 11 ماه پیش
phpbench.json.dist 713940b89d first commit 11 ماه پیش
phpunit.xml 713940b89d first commit 11 ماه پیش

README.md

gfx-php - The pure PHP graphics library

Build Status Latest Stable Version Total Downloads License Coverage Status

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.

Features

  • Format support includes PNG, GIF, BMP and the Netpbm formats (See docs: File formats).
  • Support for scaling, cropping, format conversion and colorspace transformations (See docs: Image operations).
  • Pure PHP: This library does not require Gd, ImageMagick or GraphicsMagick extensions.

Quick start

Requirements

  • PHP 7.0 or newer.
  • zlib extension, for reading PNG files.

Installation

Install gfx-php with composer:

composer install mike42/gfx-php

Basic usage

The basic usage is like this:

<?php
use Mike42\GfxPhp\Image;
$img = Image::fromFile("colorwheel256.png");
$img -> write("test.gif");

Further reading

Contributing

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.

Scope

As a small project, we can't do everything. In particular, gfx-php is not likely to ever perform non-raster operations:

  • vector image formats (PDF, SVG, EPS, etc).
  • anything involving vector fonts

Acknowledgements

This repository uses test files from other projects:

Similar projects

  • Imagine, which wraps available libraries.