Fork me on GitHub

raw — Create a new image resource from image data string

Description

public static Intervention\Image\Image raw($string)

Static factory method to create a new empty image instance from a given image string.

Parameters

string

A string containing the image data.

Return Values

Instance of Intervention\Image\Image

Examples

// create a new resource from image stream
$data = file_get_contents('public/test.jpg');
$img = Image::raw($data);

See also