File: docs/

Recommend this page to a friend!
  Classes of Jose Luis Quintana  >  GImage  >  docs/  >  Download  
File: docs/
Role: Example script
Content type: text/markdown
Description: Example script
Class: GImage
Create graphic images with a fluent interface
Author: By
Last change:
Date: 2 years ago
Size: 855 bytes


Class file image Download

Getting started


!!! tip "Requirements"

GImage requires [PHP 7.0+][1] and latest [GD Extension][2].

Make sure if [GD extension][2] is loaded. You can verify it using the following command:

php -r "var_dump(extension_loaded('gd'));"
# bool(true)

Then install GImage via [Composer][3]:

composer require joseluisq/gimage

[1]: [2]: [3]:


Loading an external PNG image and saving it as JPG:


use GImage\Image;

// PNG image (600x199)
$url = '';

$arch = new Image();
    // Load from URL
	// Scale to 50% (300x99)
	// Change the format to JPG
	// Saving in local path

For more information send a message to info at phpclasses dot org.