Skip to content

Latest commit

 

History

History
37 lines (24 loc) · 806 Bytes

backup.md

File metadata and controls

37 lines (24 loc) · 806 Bytes

Image::backup

Save a backup of the current image state

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

Backups current image state as fallback for reset method under an optional name. Overwrites older state on every call, unless a different name is passed.

Parameters

name (optional)

The name of the backup in memory. Default: default

Return Values

Instance of Intervention\Image\Image

Examples

// create empty canvas with black background
$img = Image::canvas(120, 90, '#000000');

// fill image with color
$img->fill('#b53717');

// backup image with colored background
$img->backup();

// fill image with tiled image
$img->fill('tile.png');

// return to colored background
$img->reset();

See also