|Last Updated|| ||Ratings|| ||Unique User Downloads|| ||Download Rankings|
|2023-01-18 (8 months ago) || 65%||Total: 569 ||All time: 5,371 This week: 70|
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.
> A PHP library for easy image handling. ?
__GImage__ is a simple and small library based on PHP Image Processing and GD for processing images easily.
_Presentation card built with GImage - View code example_
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.
GImage requires PHP
7.4 or a recent PHP version with the latest GD Extension.
composer require joseluisq/gimage
Load an external PNG image and save it as JPG:
// PNG image (600x199)
$url = 'https://i.imgur.com/G5MR088.png';
$arch = new Image();
// Load from URL
// Scale to 50% (300x99)
// Change the format to JPG
// Saving in local path
See GImage Website for detailed usage instructions and more advanced examples.
Check out the CHANGELOG.md file.
See code examples directory.
composer run-script test
Via Docker (multi PHP versions test)
Feel free to send some Pull request or file an issue.
This work is primarily distributed under the terms of the MIT license.
©2015-present Jose 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.