Exemplo n.º 1
0
 public function testStaticCallRaw()
 {
     $data = file_get_contents('public/test.jpg');
     $img = Image::raw($data);
     $this->assertInternalType('resource', $img->resource);
     $this->assertInternalType('int', $img->width);
     $this->assertInternalType('int', $img->height);
     $this->assertEquals($img->width, 800);
     $this->assertEquals($img->height, 600);
 }
Exemplo n.º 2
0
 /**
  * Create a new image resource with image data from string
  *
  * @param string $data
  * @return \Intervention\Image\Image 
  * @static 
  */
 public static function raw($string)
 {
     return \Intervention\Image\Image::raw($string);
 }