Download the PHP package jackal/image-merge without Composer

On this page you can find all versions of the php package jackal/image-merge. 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 image-merge

Image Merge

A simple PHP library to manipulate images. It supports JPEG, PNG, GIF and WebP.

Latest Stable Version Total Downloads License CI

Upgrading from 0.4.x? Version 1.0 has a new, safer API. See UPGRADE-1.0.md.

Requirements

Getting Started

Install the library with composer

Usage

Loading an image

Pick the factory that matches your source:

Minimal example

Get the image content

Save the image to a path

Get a Response object (compatible with Symfony projects)

toJPG(), toGIF() and toWebP() work the same way.

Operations

resize

At least one parameter is required. If only one is passed, the aspect ratio of the image is kept

If both are passed, the image may be stretched

thumbnail

Like resize, but if the aspect ratio doesn't match it crops the image (using cropCenter)

rotate

Rotate the image (counterclockwise)

*For angles that aren't multiples of 90, the empty areas are filled with transparent pixels.

flipHorizontal and flipVertical

grayScale

Add a grayscale filter to the image

brightness and contrast

blur

Add a blur effect to the image

pixelate

Add a "pixel" effect to the image

crop and cropCenter

Crop the image starting from the x and y coords, with the given output size. The area must be inside the image, otherwise an InvalidArgumentException is thrown

Crop at the center of the image, with the given output size

cropPolygon

Keep only the area inside the polygon (at least three x,y points), making the rest transparent

border

Add a border to the image (drawn inside the image)

merge

Draw another image on top, at the given position

Experimental features that will likely change in the future

addText

Add text to the image

addSquare

Add a color-filled square to the image

Security

The library is designed to be safe with untrusted input, within these limits:

Development

Or one tool at a time:

Command What it does
composer test Run the PHPUnit suite
composer cs / composer cs-fix Check / fix code style (php-cs-fixer, config in .php-cs-fixer.dist.php)
composer rector / composer rector-fix Check / apply automated refactorings (Rector, config in rector.php)

When you run the fixers, run Rector first and php-cs-fixer second, because Rector's output is then reformatted.

Tests that download a real image are in the network group. Skip them offline with vendor/bin/phpunit --exclude-group network.

The suite needs GD, EXIF and ImageMagick. If you don't have them locally, use the bundled Docker image (the PHP_VERSION build argument chooses the PHP version):

CI (GitHub Actions) runs the tests on PHP 8.2, 8.3, 8.4 and 8.5, plus PHP 8.2 with the lowest allowed dependencies. It also runs composer validate --strict, composer audit, and the Rector and php-cs-fixer checks.

Author

License

This project is licensed under the MIT License, see LICENSE.

The bundled font Liberation Sans (src/Resources/Fonts/LiberationSans-Regular.ttf) is licensed under the SIL Open Font License 1.1, see src/Resources/Fonts/LICENSE-LiberationSans.txt.


All versions of image-merge with dependencies

PHP Build Version
Package Version
Requires php Version ^8.2
ext-gd Version *
ext-exif Version *
symfony/http-foundation Version ^6.4 || ^7.0
symfony/process Version ^6.4 || ^7.0
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 jackal/image-merge contains the following files

Loading the files please wait ...