Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/mike42/gfx-php
The pure PHP graphics library
https://github.com/mike42/gfx-php
gif graphics hacktoberfest image-processing php png pnm raster-graphics
Last synced: 3 months ago
JSON representation
The pure PHP graphics library
- Host: GitHub
- URL: https://github.com/mike42/gfx-php
- Owner: mike42
- License: lgpl-2.1
- Created: 2018-04-04T11:59:35.000Z (almost 7 years ago)
- Default Branch: main
- Last Pushed: 2023-12-28T03:49:31.000Z (about 1 year ago)
- Last Synced: 2024-10-11T02:11:40.975Z (3 months ago)
- Topics: gif, graphics, hacktoberfest, image-processing, php, png, pnm, raster-graphics
- Language: PHP
- Homepage: https://gfx-php.readthedocs.io/
- Size: 808 KB
- Stars: 23
- Watchers: 3
- Forks: 4
- Open Issues: 10
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# gfx-php - The pure PHP graphics library
[![Build Status](https://travis-ci.org/mike42/gfx-php.svg?branch=master)](https://travis-ci.org/mike42/gfx-php) [![Latest Stable Version](https://poser.pugx.org/mike42/gfx-php/v/stable)](https://packagist.org/packages/mike42/gfx-php)
[![Total Downloads](https://poser.pugx.org/mike42/gfx-php/downloads)](https://packagist.org/packages/mike42/gfx-php)
[![License](https://poser.pugx.org/mike42/gfx-php/license)](https://packagist.org/packages/mike42/gfx-php) [![Coverage Status](https://coveralls.io/repos/github/mike42/gfx-php/badge.svg?branch=master)](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
- 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
### Requirements
- PHP 7.0 or newer.
- `zlib` extension, for reading PNG files.### Installation
Install `gfx-php` with composer:
```bash
composer install mike42/gfx-php
```### Basic usage
The basic usage is like this:
```php
write("test.gif");
```### Further reading
- Read of the documentation at [gfx-php.readthedocs.io](https://gfx-php.readthedocs.io/)
- See the `examples/` sub-folder for snippets.## 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](https://travis-ci.org/mike42/gfx-php). 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:
- [BMP Suite](http://entropymine.com/jason/bmpsuite/) by Jason Summers.
- [PyGIF](https://github.com/robert-ancell/pygif) test suite by Robert Ancell.
- [pngsuite](http://www.schaik.com/pngsuite/) by Willem van Schaik.## Similar projects
- [Imagine](https://github.com/avalanche123/Imagine), which wraps available libraries.