2017 © Pedro Peláez
 

library gimage

A PHP library for easy image handling.

image

joseluisq/gimage

A PHP library for easy image handling.

  • Saturday, April 28, 2018
  • by joseluisq
  • Repository
  • 11 Watchers
  • 142 Stars
  • 175 Installations
  • PHP
  • 0 Dependents
  • 0 Suggesters
  • 7 Forks
  • 1 Open issues
  • 17 Versions
  • 17 % Grown

The README.md

GImage

Build Status Latest Unstable Version Total Downloads License, (*1)

A PHP library for easy image handling. 🖼, (*2)

GImage is a simple and small library based on PHP Image Processing and GD for processing images easily., (*3)

A simple presentation card with GImage, (*4)

Presentation card built with GImage - View code example, (*5)

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

GImage requires PHP 7.4 or a recent PHP version with the latest GD Extension., (*6)

Install

composer require joseluisq/gimage

Usage

Load an external PNG image and save it as JPG:, (*7)

<?php

use GImage\Image;

// PNG image (600x199)
$url = 'https://i.imgur.com/G5MR088.png';

$arch = new Image();
$arch
    // Load from URL
    ->load($url)
    // Scale to 50% (300x99)
    ->scale(0.5)
    // Change the format to JPG
    ->toJPG()
    // Saving in local path
    ->save('arch.jpg');

See GImage Website for detailed usage instructions and more advanced examples., (*8)

Changelog

Check out the CHANGELOG.md file., (*9)

Examples

See code examples directory., (*10)

Development

Run tests

Via Composer, (*11)

composer install
composer run-script test

Via Docker (multi PHP versions test), (*12)

make docker-tests

Contribution

Feel free to send some Pull request or file an issue., (*13)

License

This work is primarily distributed under the terms of the MIT license., (*14)

©2015-present Jose Quintana, (*15)

The Versions

28/04 2018

dev-master

9999999-dev

A PHP library for easy image handling.

  Sources   Download

MIT

The Requires

  • php ^7.0
  • ext-gd *

 

The Development Requires

file image resize crop gd jpg handler jpeg save png rectangle ellipse

28/04 2018

dev-develop

dev-develop

A PHP library for easy image handling.

  Sources   Download

MIT

The Requires

  • php ^7.0
  • ext-gd *

 

The Development Requires

file image resize crop gd jpg handler jpeg save png rectangle ellipse

26/04 2018

3.0.6

3.0.6.0

A PHP library for easy image handling.

  Sources   Download

MIT

The Requires

  • php ^7.0
  • ext-gd *

 

The Development Requires

file image resize crop gd jpg handler jpeg save png rectangle ellipse

24/04 2018

3.0.5

3.0.5.0

A PHP library for easy image handling.

  Sources   Download

MIT

The Requires

  • php ^7.0
  • ext-gd *

 

The Development Requires

file image resize crop gd jpg handler jpeg save png rectangle ellipse

23/12 2017

3.0.4

3.0.4.0

A PHP library for easy image handling.

  Sources   Download

MIT

The Requires

  • php ^7.0
  • ext-gd *

 

The Development Requires

file image resize crop gd jpg handler jpeg save png rectangle ellipse

07/10 2017

3.0.3

3.0.3.0

A PHP library for easy image handling.

  Sources   Download

MIT

The Requires

  • php ^7.0
  • ext-gd *

 

The Development Requires

file image resize crop gd jpg handler jpeg save png rectangle ellipse

01/05 2017

v3.0.x-dev

3.0.9999999.9999999-dev

A PHP library for easy image handling.

  Sources   Download

MIT

The Requires

  • php ^7.0
  • ext-gd *

 

The Development Requires

file image resize crop gd jpg handler jpeg save png rectangle ellipse

30/04 2017

3.0.2

3.0.2.0

A PHP library for easy image handling.

  Sources   Download

MIT

The Requires

  • php ^7.0
  • ext-gd *

 

The Development Requires

file image resize crop gd jpg handler jpeg save png rectangle ellipse

14/04 2017

3.0.1

3.0.1.0

A PHP library for easy image handling.

  Sources   Download

MIT

The Requires

  • php ^7.0

 

The Development Requires

file image resize crop gd jpg handler jpeg save png rectangle ellipse

16/02 2017

3.0.0

3.0.0.0

A PHP library for easy image handling.

  Sources   Download

MIT

The Requires

  • php ^7.0

 

The Development Requires

file image resize crop gd jpg handler jpeg save png rectangle ellipse

27/10 2016

v2.0.x-dev

2.0.9999999.9999999-dev

A simple PHP library for easy image handling.

  Sources   Download

MIT

The Requires

 

The Development Requires

file image resize crop gd jpg handler jpeg save png

20/10 2016

2.0.1

2.0.1.0

A simple PHP library for easy image handling.

  Sources   Download

MIT

The Requires

 

The Development Requires

file image resize crop gd jpg handler jpeg save png

29/09 2016

2.0.0

2.0.0.0

A simple PHP library for easy image handling.

  Sources   Download

MIT

The Requires

 

The Development Requires

file image resize crop gd jpg handler jpeg save png

29/09 2016

dev-v2-dev

dev-v2-dev

A simple PHP library for easy image handling.

  Sources   Download

MIT

The Requires

 

The Development Requires

file image resize crop gd jpg handler jpeg save png

20/07 2016

1.5.2

1.5.2.0

A simple PHP library for easy image handling.

  Sources   Download

MIT

The Requires

  • php >=5.3

 

file image resize crop gd jpg handler jpeg save png

12/01 2016

1.5.1

1.5.1.0

A simple PHP library for easy image handling.

  Sources   Download

MIT

The Requires

  • php >=5.3
  • gd *

 

file image resize crop gd jpg handler jpeg save png

15/11 2015

1.5.0

1.5.0.0

A simple PHP library for easy image handling.

  Sources   Download

MIT

The Requires

  • php >=5.3
  • gd *

 

file image resize crop gd jpg handler jpeg save png