Download the PHP package midnight/image without Composer

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

midnight/image

A small image editing library for PHP

Installation

The library is available as a Composer package:

Usage

Open an image:

Apply a filter:

Get the new image after applying a filter:

Included filters

The library comes with some pre-defined filters. They can be accessed by calling the filter name as a method of the image object. All filters accept an options array as their only argument. For example:

fit

Scales the image up or down to fit it inside a rectangle defined by the options width and height. It's the equivalent of CSS's background-size: contain property or Adobe InDesign's "Fit proportionally" option.

fill

The fill filter fills a rectangle defined by the options width and height. It's the equivalent of CSS's background-size: cover property or Adobe InDesign's "Fill proportionally" option. It will most likely crop parts of the image.

brighten

Brightens the image. The only option is amount, which accepts an integer from -255 (which actually darkens the image) to 255.

desaturate

Desaturates the image. The only option is amount, which accepts an integer from -100 (which actually saturates image) to 100.

colorcast

Applies a color cast to the image. The available options are color, which accepts an instance of Midnight\Color\Color (actually ColorInterface) and amount, which accepts a value between 0 and 1.

noise

Adds noise to the image. The only option available is amount.

Adding a custom filter

You can easily add a custom filter:


All versions of image with dependencies

PHP Build Version
Package Version
Requires zendframework/zend-filter Version >=2.0.0
zendframework/zend-servicemanager Version >=2.0.0
midnight/color Version ~1.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 midnight/image contains the following files

Loading the files please wait ....