Skip to content

Filters Methods

Andrei Coelho edited this page Sep 5, 2019 · 3 revisions

Filters methods

Increase or decrease image brightness
Transform the image to grayscale
Reverses all colors of the image.

brightness()

brightness(int $level, mixed $alias = false)

Description

Use this function to changes the brightness of the image. For this, you need set the level of brightness.

This level has a range -255 to 255. The bigger the clearer. The smaller the darker.

Example

EditImage::
    from('images/turtle.jpg', 'img1')
    ->brightness(-100)
    ->save(); 

dark


grayscale()

grayscale(mixed $alias = false)

Description

Use this function to transform image in grayscale.

Example

EditImage::
    from('images/turtle.jpg')
    ->grayscale()
    ->save(); 

pb


negate()

negate(mixed $alias = false)

Description

Use this function to invert the colors of the image.

EditImage::
    from('images/turtle.jpg')
    ->negate()
    ->save(); 

negate