Example #1
0
 public function testPictureWriterWritesTemplateImage()
 {
     $imageToSave = Image::make("./tests/FaceInserterTestData/result.png");
     PictureWriter::saveTemplateImage("filename.png", $imageToSave);
     $retrievedImage = PictureReader::readTemplate("filename.png");
     $this->assertInstanceOf(\Intervention\Image\Image::class, $retrievedImage);
 }
Example #2
0
 /**
  *	Save the image and return the filename
  */
 public static function saveResultImage(\Intervention\Image\Image $image)
 {
     $filename = str_random(60) . ".png";
     PictureWriter::saveResultImage($filename, $image);
     return $filename;
 }