PHPackages                             alves/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. alves/gfx-php

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

alves/gfx-php
=============

The pure PHP graphics library

v1.0.0(5mo ago)181LGPL-2.1-or-laterPHPPHP &gt;=7.0.0

Since Jan 19Pushed 5mo agoCompare

[ Source](https://github.com/andersonav/gfx-php)[ Packagist](https://packagist.org/packages/alves/gfx-php)[ Docs](https://github.com/alves/gfx-php)[ RSS](/packages/alves-gfx-php/feed)WikiDiscussions main Synced today

READMEChangelogDependencies (2)Versions (2)Used By (1)

gfx-php
=======

[](#gfx-php)

### A pure PHP graphics library

[](#a-pure-php-graphics-library)

[![Build Status](https://camo.githubusercontent.com/be35f89dcf03bfae6e00dc35e0967c4576f31de0140e391c7f246f0cc560ba86/68747470733a2f2f7472617669732d63692e6f72672f616c7665732f6766782d7068702e7376673f6272616e63683d6d6173746572)](https://travis-ci.org/alves/gfx-php)[![Latest Stable Version](https://camo.githubusercontent.com/dc59577a8acc94efda5cc4f9e78220d530b2a91e27552c3a375abe8de7cf4355/68747470733a2f2f706f7365722e707567782e6f72672f616c7665732f6766782d7068702f762f737461626c65)](https://packagist.org/packages/alves/gfx-php)[![Total Downloads](https://camo.githubusercontent.com/5b6bcf4ff956d8bcdfab1bd5c29ff19ddc6e198e3f56ca3485e99bc555d3787f/68747470733a2f2f706f7365722e707567782e6f72672f616c7665732f6766782d7068702f646f776e6c6f616473)](https://packagist.org/packages/alves/gfx-php)[![License](https://camo.githubusercontent.com/0ac6a3c6115271ea2c08eaa64aae27f48b16d9b79e97b716fb9c1e82fb30d815/68747470733a2f2f706f7365722e707567782e6f72672f616c7665732f6766782d7068702f6c6963656e7365)](https://packagist.org/packages/alves/gfx-php)[![Coverage Status](https://camo.githubusercontent.com/0d4f9dea5df0912f000ceeb54c9746f1feea03d31e484d0bde929d8f42df3639/68747470733a2f2f636f766572616c6c732e696f2f7265706f732f6769746875622f616c7665732f6766782d7068702f62616467652e7376673f6272616e63683d6d6173746572)](https://coveralls.io/github/alves/gfx-php?branch=master)

`gfx-php` is a **pure PHP** library for reading, writing and processing **raster images**, without requiring any native extensions such as **GD**, **ImageMagick** or **GraphicsMagick**.

This makes it especially useful in **restricted or portable environments**, where installing or enabling PHP extensions is not possible.

---

✨ Features
----------

[](#-features)

- **Pure PHP implementation** — no external image extensions required.
- Support for common raster formats:
    - PNG
    - GIF
    - BMP
    - Netpbm formats
        *(see: [File formats documentation](https://gfx-php.readthedocs.io/en/latest/user/formats.html))*
- Image operations:
    - scaling
    - cropping
    - format conversion
    - colorspace transformations
        *(see: [Image operations documentation](https://gfx-php.readthedocs.io/en/latest/user/operations.html))*
- Designed for **portability and predictability** across different PHP environments.

---

🚀 Quick start
-------------

[](#-quick-start)

### Requirements

[](#requirements)

- PHP **7.0 or newer**
- `zlib` extension (required for reading PNG files)

---

### Installation

[](#installation)

Install via Composer:

```
composer require alves/gfx-php
```

###  Health Score

30

—

LowBetter than 62% of packages

Maintenance71

Regular maintenance activity

Popularity7

Limited adoption so far

Community8

Small or concentrated contributor base

Maturity30

Early-stage or recently created project

 Bus Factor1

Top contributor holds 100% of commits — single point of failure

How is this calculated?**Maintenance (25%)** — Last commit recency, latest release date, and issue-to-star ratio. Uses a 2-year decay window.

**Popularity (30%)** — Total and monthly downloads, GitHub stars, and forks. Logarithmic scaling prevents top-heavy scores.

**Community (15%)** — Contributors, dependents, forks, watchers, and maintainers. Measures real ecosystem engagement.

**Maturity (30%)** — Project age, version count, PHP version support, and release stability.

###  Release Activity

Cadence

Unknown

Total

1

Last Release

165d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/fec03576723f1006aa8d355fc6b99baf9969bd016cbe5550eb7f13978e14a984?d=identicon)[andersonav](/maintainers/andersonav)

---

Top Contributors

[![andersonav](https://avatars.githubusercontent.com/u/38483866?v=4)](https://github.com/andersonav "andersonav (1 commits)")

###  Code Quality

TestsPHPUnit

Code StylePHP\_CodeSniffer

### Embed Badge

![Health badge](/badges/alves-gfx-php/health.svg)

```
[![Health](https://phpackages.com/badges/alves-gfx-php/health.svg)](https://phpackages.com/packages/alves-gfx-php)
```

###  Alternatives

[goat1000/svggraph

Generates SVG graphs

135911.1k3](/packages/goat1000-svggraph)[gravatarphp/gravatar

Gravatar URL builder which is most commonly called as a Gravatar library

16653.6k2](/packages/gravatarphp-gravatar)[rsoury/wp-imgix

Rewrites WordPress image URLs to use ImgIX

167.2k](/packages/rsoury-wp-imgix)

PHPackages © 2026

[Directory](/)[Categories](/categories)[Trending](/trending)[Changelog](/changelog)[Analyze](/analyze)
