Last Updated | | Ratings | | Unique User Downloads | | Download Rankings |
2020-12-20 (1 month ago)  | |    65% | | Total: 556 This week: 1 | | All time: 5,402 This week: 262 |
|
Description | | Author |
This package can create and compose canvas images from other images.
It provides classes for creating image objects defined by colored rectangles, images from files and text.
An additional canvas class can compose complex images using images defined by the other classes easier.
The composed images may be saved to files in the PNG and JPEG formats or displayed as the current script output.
| |
|
Details
GImage

> A PHP library for easy image handling. ?

_Presentation card built with GImage - View code example_
Features
__GImage__ is a simple and small library based on PHP Image Processing and GD for processing images without stress.
-
Load an image from 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 in local or output on the browser.
-
Save several copies of the same image.
-
Render an image in-memory and return the resource.
Requirements
GImage requires PHP 7.x and latest GD Extension.
Install
composer require joseluisq/gimage
Usage
Load an external PNG image and save it as JPG:
<?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 code examples.
Changelog
Check out the CHANGELOG.md file.
Contribution
If you would like to contribute pull requests and issues will be welcome! Feature requests are welcome. Please before sending some feature requests make sure provide as much detail and context as possible.
License
MIT license
©2015-present José Quintana
|
Applications that use this package |
|
No pages of applications that use this class were specified.
If you know an application of this package, send a message to the author to add a link here.