I have eID card reader SDK used from ( https://github.com/KeejOow/eidlib ), it works great.
using the SDK it allowed me to read my ID card details but i need to read the picture so i got this Hash Picture value using SDK.
Hash picture: *P¿xxxxxxxxx
CODE:
public function removemeoncetestedAction() {
$this->_helper->layout()->disableLayout();
$this->_helper->viewRenderer->setNoRender();
//$this->_response->setHeader('Access-Control-Allow-Origin', '*');
$this->db = Application_Model_Db::db_load();
$sql = "select *From idcard order by id desc limit 1";
$cresult = $this->db->fetchAll($sql);
if(count($cresult) > 0) {
$arr = explode("\n", $cresult[0]['card']);
$encodedPhoto = base64url_decode($arr[18]); // Hash picture
//header('Content-Type: image/jpeg');
echo "<img src='{$encodedPhoto}' />";
}
exit;
}
How can i get from this hash field the real picture png, jpeg? when i execute above code i do not get any image preview at all.