Skip to content
This repository has been archived by the owner on Jan 18, 2020. It is now read-only.

Commit

Permalink
Merge pull request #20 from D144/master
Browse files Browse the repository at this point in the history
Added ability to pass in image as string
  • Loading branch information
mauricesvay committed Jan 25, 2016
2 parents 1d13d56 + 2aae02f commit 7311144
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions FaceDetector.php
Original file line number Diff line number Diff line change
Expand Up @@ -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");
Expand Down

0 comments on commit 7311144

Please sign in to comment.