public function Face_Detector::toJpeg in Image Focus Crop 6
Same name and namespace in other branches
- 7 php-facedetection/FaceDetector.php \Face_Detector::toJpeg()
File
- php-facedetection/
FaceDetector.php, line 80
Class
Code
public function toJpeg() {
$color = imagecolorallocate($this->canvas, 255, 0, 0);
//red
imagerectangle($this->canvas, $this->face['x'], $this->face['y'], $this->face['x'] + $this->face['w'], $this->face['y'] + $this->face['w'], $color);
header('Content-type: image/jpeg');
imagejpeg($this->canvas);
}