faceapi_helper.php edited online with Bitbucket

This commit is contained in:
gandhimathi 2022-05-31 16:28:49 +00:00
parent a4c9a5f1af
commit 8ce79cfc4e

View File

@ -51,6 +51,7 @@ class faceapi
}else if($Similarity_value < 70 ){// below 70 red }else if($Similarity_value < 70 ){// below 70 red
$color = imagecolorallocate($img, 255, 0, 0); $color = imagecolorallocate($img, 255, 0, 0);
} }
$white = imagecolorallocate($img, 255, 255, 255);
log_message('ERROR','In faceapi helper @ line no : 45 Draw Line color : '.$color); log_message('ERROR','In faceapi helper @ line no : 45 Draw Line color : '.$color);
$Similarity = $Similarity_value." %"; $Similarity = $Similarity_value." %";
//TOP LINe //TOP LINe
@ -71,9 +72,12 @@ class faceapi
$imgl = self::imagelinethick($img,$t_x2,$t_y2,$b_x2,$b_y2,$color,7);//right line $imgl = self::imagelinethick($img,$t_x2,$t_y2,$b_x2,$b_y2,$color,7);//right line
// apppath / doc la roboto.tff // apppath / doc la roboto.tff
$font = APPPATH."docs/roboto.ttf"; $font = APPPATH."docs/roboto.ttf";
imagettftext($img, 20, 0, ($t_x1), ($t_y1-5), $color,$font, $Similarity); // imagettftext($img, 20, 0, ($t_x1), ($t_y1-5), $color,$font, $Similarity);
// imagepng($img, $destination_path); // imagepng($img, $destination_path);
// imagepng($img, "face4.png"); // imagepng($img, "face4.png");
imagefilledrectangle($img, $t_x1-5, $t_y1-18, $t_x1+28, $t_y1, $white);
imagettftext($img, 10, 10, ($t_x1), ($t_y1-5), $color,$font, $Similarity);
$get_image_format = explode(".",$destination_path); $get_image_format = explode(".",$destination_path);
$image_format = $get_image_format[1]; $image_format = $get_image_format[1];