diff --git a/FaceDetector.php b/FaceDetector.php index 148e834..ae96b4d 100644 --- a/FaceDetector.php +++ b/FaceDetector.php @@ -68,6 +68,10 @@ public function faceDetect($file) $this->canvas = imagecreatefromjpeg($file); + } elseif (is_string($file)) { + + $this->canvas = imagecreatefromstring($file); + } else { throw new Exception("Can not load $file");