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

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

See also