PHPackages                             mike42/gfx-php - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [Image &amp; Media](/categories/media)
4. /
5. mike42/gfx-php

ActiveLibrary[Image &amp; Media](/categories/media)

mike42/gfx-php
==============

The pure PHP graphics library

v0.6(6y ago)271.1M—2.3%4[7 issues](https://github.com/mike42/gfx-php/issues)[3 PRs](https://github.com/mike42/gfx-php/pulls)1LGPL-2.1-or-laterPHPPHP &gt;=7.0.0CI failing

Since Apr 28Pushed 2y ago2 watchersCompare

[ Source](https://github.com/mike42/gfx-php)[ Packagist](https://packagist.org/packages/mike42/gfx-php)[ Docs](https://github.com/mike42/gfx-php)[ RSS](/packages/mike42-gfx-php/feed)WikiDiscussions main Synced 1mo ago

READMEChangelog (10)Dependencies (3)Versions (13)Used By (1)

gfx-php - The pure PHP graphics library
=======================================

[](#gfx-php---the-pure-php-graphics-library)

[![Build Status](https://camo.githubusercontent.com/0076d248456dca5f2395e9f9652e9a1c180ef5aa3bd4cfe77b4035a1715283f6/68747470733a2f2f7472617669732d63692e6f72672f6d696b6534322f6766782d7068702e7376673f6272616e63683d6d6173746572)](https://travis-ci.org/mike42/gfx-php) [![Latest Stable Version](https://camo.githubusercontent.com/383dd8343bf1fdc6247f8030314384a5e3f6ea916b99450dd6d8095566c89dac/68747470733a2f2f706f7365722e707567782e6f72672f6d696b6534322f6766782d7068702f762f737461626c65)](https://packagist.org/packages/mike42/gfx-php)[![Total Downloads](https://camo.githubusercontent.com/23e03e05b2f1e588adf3376de4d248affd2318e97b5ebb11940d650edb4693bb/68747470733a2f2f706f7365722e707567782e6f72672f6d696b6534322f6766782d7068702f646f776e6c6f616473)](https://packagist.org/packages/mike42/gfx-php)[![License](https://camo.githubusercontent.com/5184e002cd256285351e21fb8d5d9afeb5c9e07e2e88ce33825b029f8156b8b5/68747470733a2f2f706f7365722e707567782e6f72672f6d696b6534322f6766782d7068702f6c6963656e7365)](https://packagist.org/packages/mike42/gfx-php) [![Coverage Status](https://camo.githubusercontent.com/4b538aa9da16152b49123c02966d58f76f83f42d7a3a87451d0b22fa914a1cc8/68747470733a2f2f636f766572616c6c732e696f2f7265706f732f6769746875622f6d696b6534322f6766782d7068702f62616467652e7376673f6272616e63683d6d6173746572)](https://coveralls.io/github/mike42/gfx-php?branch=master)

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

[](#features)

- Format support includes PNG, GIF, BMP and the Netpbm formats (See docs: [File formats](https://gfx-php.readthedocs.io/en/latest/user/formats.html)).
- Support for scaling, cropping, format conversion and colorspace transformations (See docs: [Image operations](https://gfx-php.readthedocs.io/en/latest/user/operations.html)).
- Pure PHP: This library does not require Gd, ImageMagick or GraphicsMagick extensions.

Quick start
-----------

[](#quick-start)

### Requirements

[](#requirements)

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

### Installation

[](#installation)

Install `gfx-php` with composer:

```
composer install mike42/gfx-php
```

### Basic usage

[](#basic-usage)

The basic usage is like this:

```
