You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
How to get image in binary form from controller ?
I used below code in controller but Image is not correct ?
$this->load->library('ciqrcode');
//$qrCodeObj = new Ciqrcode();
$params['data'] = 'VON';
$params['level'] = 'H';
$params['size'] = 10;
$filename = rand(100, 20000).'.png';
//$params['savename'] = '';
ob_start();
$this->ciqrcode->generate($params);
$imageString = base64_encode( ob_get_contents() );
ob_end_clean();
//use $imageString for further use
This code working without codeIgnitor using (phpqrcode library) but in codeIgnitor its not working. Please suggest how to get binary image data using this library.
The text was updated successfully, but these errors were encountered:
How to get image in binary form from controller ?
I used below code in controller but Image is not correct ?
$this->load->library('ciqrcode');
//$qrCodeObj = new Ciqrcode();
$params['data'] = 'VON';
$params['level'] = 'H';
$params['size'] = 10;
$filename = rand(100, 20000).'.png';
//$params['savename'] = '';
ob_start();
$this->ciqrcode->generate($params);
$imageString = base64_encode( ob_get_contents() );
ob_end_clean();
//use $imageString for further use
This code working without codeIgnitor using (phpqrcode library) but in codeIgnitor its not working. Please suggest how to get binary image data using this library.
The text was updated successfully, but these errors were encountered: