Skip to content
David Mongeau-Petitpas edited this page Mar 21, 2014 · 1 revision

Image filters can be used to easily manipulate images. You can use those filters both with the Image:url(); method and make();.

For example:

echo Image::url('/path/to/image.png',array(
    'width' => 300,
    'height' => 300,
    'crop' => true,
    'grayscale' => true
));

It will generate an image url that will a serve a 300x300 black and white version of your image.

And:

$image = Image::make('/path/to/image.png',array(
    'width' => 300,
    'height' => 300,
    'crop' => true,
    'grayscale' => true
));

Will return an Imagine Image instance cropped to 300x300 and in black and white.

Here is the list of possible parameters:

Name Type Description
width integer Maximum width of the image
height integer Maximum height of the image
crop boolean Crop the image to fit exactly in the width and height parameters
grayscale boolean Make the image in black and white
negative boolean Invert the image
rotate float Rotate the image
gamma float Control the gamma of the image
blur float Apply some blur on the image
colorize string Colorize the image. (Hex color value)
Clone this wiki locally