Fork me on GitHub

reset — Reset image instance

Description

public Intervention\Image\Image reset()

Resets all of the modifications to a state saved previously by backup.

Note: To be more memory efficient backup() needs to be called first, when using reset() since 1.6.0.

Parameters

none

Return Values

Instance of Intervention\Image\Image

Examples

// create an image
$img = Image::make('public/foo.jpg');

// backup status
$img->backup();

// perform some modifications
$img->resize(320, 240);
$img->invert();
$img->save('public/small.jpg');

// reset image (return to backuped state)
$img->reset();

// perform other modifications
$img->resize(640, 480);
$img->invert();
$img->save('public/large.jpg');

See also