From 8ce79cfc4e3ac39d4e354c47ffd5d1bfeb12d69f Mon Sep 17 00:00:00 2001 From: gandhimathi Date: Tue, 31 May 2022 16:28:49 +0000 Subject: [PATCH] faceapi_helper.php edited online with Bitbucket --- api/application/helpers/faceapi_helper.php | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/api/application/helpers/faceapi_helper.php b/api/application/helpers/faceapi_helper.php index a2c86b62..8b884915 100644 --- a/api/application/helpers/faceapi_helper.php +++ b/api/application/helpers/faceapi_helper.php @@ -51,6 +51,7 @@ class faceapi }else if($Similarity_value < 70 ){// below 70 red $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); $Similarity = $Similarity_value." %"; //TOP LINe @@ -71,9 +72,12 @@ class faceapi $imgl = self::imagelinethick($img,$t_x2,$t_y2,$b_x2,$b_y2,$color,7);//right line // apppath / doc la roboto.tff $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, "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); $image_format = $get_image_format[1];