backup — backups current image state

Description

public Intervention\Image\Image backup()

Backups current image state as fallback for reset method. Overwrites older states on every call.

Parameters

none

Return Values

Instance of Intervention\Image\Image

Examples

  1. // create empty canvas with black background
  2. $img = Image::canvas(120, 90, '#000000');
  3. // fill image with color
  4. $img->fill('#b53717');
  5. // backup image with colored background
  6. $img->backup();
  7. // fill image with tiled image
  8. $img->fill('tile.png');
  9. // return to colored background
  10. $img->reset();

See also