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

Commit

Permalink
Added ability to pass in image as string
Browse files Browse the repository at this point in the history
  • Loading branch information
Dave Gross committed Feb 12, 2015
1 parent 91a113f commit 2aae02f
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 2aae02f

Please sign in to comment.