Download the PHP package gwa/gw-image-editor without Composer

On this page you can find all versions of the php package gwa/gw-image-editor. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.

FAQ

After the download, you have to make one include require_once('vendor/autoload.php');. After that you have to import the classes with use statements.

Example:
If you use only one package a project is not needed. But if you use more then one package, without a project it is not possible to import the classes with use statements.

In general, it is recommended to use always a project to download your libraries. In an application normally there is more than one library needed.
Some PHP packages are not free to download and because of that hosted in private repositories. In this case some credentials are needed to access such packages. Please use the auth.json textarea to insert credentials, if a package is coming from a private repository. You can look here for more information.

  • Some hosting areas are not accessible by a terminal or SSH. Then it is not possible to use Composer.
  • To use Composer is sometimes complicated. Especially for beginners.
  • Composer needs much resources. Sometimes they are not available on a simple webspace.
  • If you are using private repositories you don't need to share your credentials. You can set up everything on our site and then you provide a simple download link to your team member.
  • Simplify your Composer build process. Use our own command line tool to download the vendor folder as binary. This makes your build process faster and you don't need to expose your credentials for private repositories.
Please rate this library. Is it a good library?

Informations about the package gw-image-editor

gwImageEditor

A PHP image editor library that uses the bundled GD library.

Scrutinizer Code Quality Build Status

Provides a simple and intuitive interface for typical editing, cropping, resizing and filtering actions on existing images.

Typical use cases:

Installation

Install through composer:

composer require gwa/gw-image-editor

Usage

use Gwa\Image\ImageEditor;

// create an editor using an existing image
$editor = new ImageEditor('path/to/image.png');

// resize image to within 640 x 480 px, maintaining aspect ratio
$editor->resizeToWithin(640, 480)
    ->save();

// resize image to exactly 640 x 480 px, cropping any overhang
$editor->resizeTo(640, 480)
    ->save();

// resize image to exactly 640px width, preserving aspect ratio
$editor->resizeTo(640)
    ->save();

// resize image to exactly 480px height, preserving aspect ratio
$editor->resizeTo(null, 480)
    ->save();

// crop the image: x, y, width, height
$editor->crop(10, 10, 100, 100)
    ->save();

// methods can be chained
// - create and save medium image with max width and height of 500px
// - create and save thumbnail image with exact dimensions of 100px x 100px
$editor = new ImageEditor('path/to/original.jpg');
$editor->resizeToWithin(500, 500)
    ->saveAs('path/to/medium.jpg')
    ->resizeTo(100, 100)
    ->saveAs('path/to/thumbnail.jpg')
    ->saveAs('path/to/thumbnail.png', IMAGETYPE_PNG);

// another image can be "pasted" in (e.g. a watermark)
// - paste watermark into bottom right corner
$editor = new ImageEditor('path/to/original.jpg');
$iw = $editor->getWidth();
$ih = $editor->getHeight();

$watermark = new ImageEditor('path/to/watermark.png');
$ww = $watermark->getWidth();
$wh = $watermark->getHeight();

$padding = 10;

$editor->pasteImage($watermark, $iw - $ww - $padding, $ih - $wh - $padding)
    ->saveAs('path/to/watermarked.jpg');

// there are also filter methods available
$editor = new ImageEditor('path/to/original.jpg');
$editor->grayscale()
    ->coloroverlay(0, 0, 0, 50) // 50% black overlay
    ->colorize(255, 0, 0, 0) // rgba

Tests

PHPUnit

Code style (PSR-2)


All versions of gw-image-editor with dependencies

PHP Build Version
Package Version
Requires php Version >=5.4
ext-mbstring Version *
ext-exif Version *
Composer command for our command line client (download client) This client runs in each environment. You don't need a specific PHP version etc. The first 20 API calls are free. Standard composer command

The package gwa/gw-image-editor contains the following files

Loading the files please wait ....