reset — Reset image instance

Description

public Intervention\Image\Image reset([string $name])

Resets all of the modifications to a state saved previously by backup under an optional name.

Parameters

name (optional)

The name of the backup in memory. Default: default

Return Values

Instance of Intervention\Image\Image

Examples

  1. // create an image
  2. $img = Image::make('public/foo.jpg');
  3. // backup status
  4. $img->backup();
  5. // perform some modifications
  6. $img->resize(320, 240);
  7. $img->invert();
  8. $img->save('public/small.jpg');
  9. // reset image (return to backup state)
  10. $img->reset();
  11. // perform other modifications
  12. $img->resize(640, 480);
  13. $img->invert();
  14. $img->save('public/large.jpg');

See also