| Recommend this page to a friend! | 
|  Download | 
| Info | Example |  Files |  Install with Composer |  Download | Reputation | Support forum | Blog | Links | 
| Ratings | Unique User Downloads | Download Rankings | ||||
|    59% | Total: 571 | All time:  5,377 This week: 54  | ||||
| Version | License | PHP version | Categories | |||
| canvas-image 2.0.16 | MIT/X Consortium ... | 5.5 | PHP 5, Graphics | 
| Description | Author | ||||||||
| This package can create and compose canvas images from other images. | 
 | 
| 
<?php | 
  
 
 
> 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_
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:
<?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.
Check out the CHANGELOG.md file.
See code examples directory.
Via Composer
composer install
composer run-script test
Via Docker (multi PHP versions test)
make docker-tests
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
|  Files (48) | 
| File | Role | Description | ||
|---|---|---|---|---|
|  .github (1 directory) | ||||
|  docs (2 files, 1 directory) | ||||
|  examples (11 files) | ||||
|  src (5 files) | ||||
|  tests (2 files) | ||||
|    .php-cs-fixer.dist.php | Example | Example script | ||
|    CHANGELOG.md | Example | Example script | ||
|    composer.json | Data | Auxiliary data | ||
|    LICENSE-MIT | Lic. | License text | ||
|    Makefile | Data | Auxiliary data | ||
|    phpunit.xml | Data | Auxiliary data | ||
|    README.md | Data | Auxiliary data | ||
|  Files (48) | / | docs | 
| File | Role | Description | ||
|---|---|---|---|---|
|  content (4 files, 3 directories) | ||||
|    mkdocs.yml | Data | Auxiliary data | ||
|    README.md | Doc. | Documentation | ||
|  Files (48) | / | docs | / | content | 
| File | Role | Description | ||
|---|---|---|---|---|
|  assets (1 file) | ||||
|  classes (4 files) | ||||
|  examples (11 files) | ||||
|    api.md | Data | Auxiliary data | ||
|    build-documentation.md | Data | Auxiliary data | ||
|    getting-started.md | Example | Example script | ||
|    index.md | Data | Auxiliary data | ||
|  Files (48) | / | docs | / | content | / | classes | 
|  Files (48) | / | docs | / | content | / | examples | 
| File | Role | Description | 
|---|---|---|
|    composing-with-canvas.md | Example | Example script | 
|    creating-a-presentation-card.md | Example | Example script | 
|    creating-figures.md | Example | Example script | 
|    cropping.md | Example | Example script | 
|    image-resource-loading.md | Example | Example script | 
|    index.md | Data | Auxiliary data | 
|    render-images-in-memory.md | Example | Example script | 
|    resizing.md | Example | Example script | 
|    rotation.md | Example | Example script | 
|    swapping-formats.md | Example | Example script | 
|    text-embedding.md | Example | Example script | 
|  Files (48) | / | examples | 
| File | Role | Description | 
|---|---|---|
|    card.php | Example | Example script | 
|    crop.php | Example | Example script | 
|    ellipse.php | Example | Example script | 
|    jpg2png.php | Example | Example script | 
|    README.md | Doc. | Documentation | 
|    rectangle.php | Example | Example script | 
|    render.php | Example | Example script | 
|    resource.php | Example | Example script | 
|    rotate.php | Example | Example script | 
|    text.php | Example | Example script | 
|    _config.php | Aux. | Auxiliary script | 
|  Files (48) | / | src | 
| File | Role | Description | 
|---|---|---|
|  Canvas.php | Class | Class source | 
|  Figure.php | Class | Class source | 
|  Image.php | Class | Class source | 
|  Text.php | Class | Class source | 
|  Utils.php | Class | Class source | 
|  Files (48) | / | tests | 
| File | Role | Description | 
|---|---|---|
|    bootstrap.php | Aux. | Auxiliary script | 
|  GImageTest.php | Class | Class source | 
| The PHP Classes site has supported package installation using the Composer tool since 2013, as you may verify by reading this instructions page. | 
|  Install with Composer | 
| Version Control | Unique User Downloads | Download Rankings | |||||||||||||||
| 100% | 
 | 
 | 
| User Ratings | User Comments (1) | ||||||||||||||||||||||||||||||||||
| 
 | 
 | ||||||||||||||||||||||||||||||||||
| Applications that use this package | 
 If you know an application of this package, send a message to the author to add a link here.
 If you know an application of this package, send a message to the author to add a link here.