diff --git a/api/application/controllers/PD_Controller.php b/api/application/controllers/PD_Controller.php index 2c62bf5f..f35047e2 100644 --- a/api/application/controllers/PD_Controller.php +++ b/api/application/controllers/PD_Controller.php @@ -10521,9 +10521,9 @@ class PD_Controller extends REST_Controller // public function toMakeFaceBoundingBox_get(){ public function toMakeFaceBoundingBox($pdid,$len_id){ - //$pdid = $this->get('pd'); //comment this bcoz test purpose - //$master_details = $this->PD_Model->getPDMasterDetails($pdid); //comment this bcoz test purpose - //$len_id = $master_details[0]['fk_lender_id']; //comment this bcoz test purpose + // $pdid = $this->get('pd'); //comment this bcoz test purpose + // $master_details = $this->PD_Model->getPDMasterDetails($pdid); //comment this bcoz test purpose + // $len_id = $master_details[0]['fk_lender_id']; //comment this bcoz test purpose log_message('ERROR', "In PD Controller (to Make FaceBoundingBox called ) PDID : " . $pdid); $where = array('isactive' => 1, 'fk_form_id' => 18, 'fk_pd_id' => $pdid); @@ -10654,8 +10654,12 @@ class PD_Controller extends REST_Controller $file = "face_api_image_".$apcntid.$extension; $dbfile = "face_api_image_".$apcntid.".jpeg"; $key = 'pd' . $pdid . '/' . $file; - $sourcefile = $destination_path.$file; - + $image = imagecreatefrompng($destination_path.$file); + $sourcefile = imagejpeg($image, $destination_path.$dbfile, '70'); + // die(); + // imagedestroy($image); + // $sourcefile = $destination_path.$file; + // $sourcefile = imagejpeg($destination_path.$file, $destination_path.$dbfile,'70'); $bucket_data = array('bucket_name' => $bucketname, 'key' => $key, 'sourcefile' => $sourcefile); $s3result = $this->aws_s3->uploadFileToS3Bucket($bucket_data); log_message('ERROR', "In PD Controller to Make FaceBoundingBox FaceMatches s3result : " . $s3result['@metadata']['statusCode']); @@ -10671,6 +10675,7 @@ class PD_Controller extends REST_Controller $record_data = array('fk_pd_id' => $pdid, 'pd_document_title' => 'face_api_result_image_'.$apcntid, 'pd_document_name' => $dbfile ,'co_applicant_id'=>$apcntid,'image_key'=>'face_mark'); $this->PD_Model->saveRecords($record_data, PDDOCUMENTS); unlink($destination_path.$file); + unlink($destination_path.$dbfile); } } } diff --git a/api/application/views/report_templates/JSONTOREPORT_DI_AI_TELE_PD.php b/api/application/views/report_templates/JSONTOREPORT_DI_AI_TELE_PD.php index ebb5eae9..657aa638 100644 --- a/api/application/views/report_templates/JSONTOREPORT_DI_AI_TELE_PD.php +++ b/api/application/views/report_templates/JSONTOREPORT_DI_AI_TELE_PD.php @@ -609,6 +609,7 @@ if ( isset($pdf) ) {