PHPackages                             joseluisq/gimage - 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. [File &amp; Storage](/categories/file-storage)
4. /
5. joseluisq/gimage

ActiveLibrary[File &amp; Storage](/categories/file-storage)

joseluisq/gimage
================

A PHP library for easy image handling.

v4.0.0(3y ago)1523.7k—0%11[2 issues](https://github.com/joseluisq/gimage/issues)MITPHPPHP &gt;=7.4

Since Nov 15Pushed 3y ago10 watchersCompare

[ Source](https://github.com/joseluisq/gimage)[ Packagist](https://packagist.org/packages/joseluisq/gimage)[ RSS](/packages/joseluisq-gimage/feed)WikiDiscussions master Synced 1mo ago

READMEChangelog (10)Dependencies (2)Versions (16)Used By (0)

GImage
======

[](#gimage)

[![Build Status](https://github.com/joseluisq/gimage/actions/workflows/devel.yml/badge.svg?branch=master)](https://github.com/joseluisq/gimage/actions/workflows/devel.yml) [![](https://camo.githubusercontent.com/e3a52ae41d817c0143f60887af3db9c1056604a6ba01d9cdc5b8869ec022770c/68747470733a2f2f706f7365722e707567782e6f72672f6a6f73656c756973712f67696d6167652f76657273696f6e)](https://packagist.org/packages/joseluisq/gimage) [![Latest Unstable Version](https://camo.githubusercontent.com/b5e5999317f2a90d49397e4e8dc37be9d3603935e9c8c94daf42cebee445beff/68747470733a2f2f706f7365722e707567782e6f72672f6a6f73656c756973712f67696d6167652f762f756e737461626c65)](//packagist.org/packages/joseluisq/gimage) [![Total Downloads](https://camo.githubusercontent.com/fb57ffd75bd1009808b66eee41d85bcd9c041366d37649d99fb6d41488ab6750/68747470733a2f2f706f7365722e707567782e6f72672f6a6f73656c756973712f67696d6167652f646f776e6c6f616473)](https://packagist.org/packages/joseluisq/gimage) [![License](https://camo.githubusercontent.com/617aaa563059e0c7059ad7a6262a35646b6c5474b68006d78ae9e1749a714daf/68747470733a2f2f706f7365722e707567782e6f72672f6a6f73656c756973712f67696d6167652f6c6963656e7365)](https://packagist.org/packages/joseluisq/gimage)

> A PHP library for easy image handling. 🖼

**GImage** is a simple and small library based on [PHP Image Processing and GD](http://php.net/manual/en/book.image.php) for processing images easily.

[![A simple presentation card with GImage](https://cloud.githubusercontent.com/assets/1700322/18941713/eed7fa34-85d8-11e6-8033-bf787e4aa236.png)](https://cloud.githubusercontent.com/assets/1700322/18941713/eed7fa34-85d8-11e6-8033-bf787e4aa236.png)

*Presentation card built with GImage - [View code example](https://joseluisq.github.io/gimage/examples/creating-a-presentation-card/)*

Features
--------

[](#features)

- Load an image from a local path, URL or image resource.
- Create shapes such as rectangles or ellipses with opacity.
- Resize, scale or crop images proportionally.
- Rotate images, shapes or texts.
- Embed text with custom TTF fonts.
- Compose a pool of images with `Canvas`.
- Swap image formats such as JPEG, PNG or GIF.
- Save images locally or output them on the browser.
- Save several copies of the same image.
- Render an image in memory and return its resource.

Requirements
------------

[](#requirements)

GImage requires PHP [`7.4`](https://www.php.net/releases/7_4_0.php) or a recent PHP version with the latest [GD Extension](http://php.net/manual/en/book.image.php).

Install
-------

[](#install)

```
composer require joseluisq/gimage
```

Usage
-----

[](#usage)

Load an external PNG image and save it as JPG:

```
