Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Image in binary form #16

Open
varunkumar31 opened this issue Nov 25, 2016 · 0 comments
Open

Image in binary form #16

varunkumar31 opened this issue Nov 25, 2016 · 0 comments

Comments

@varunkumar31
Copy link

varunkumar31 commented Nov 25, 2016

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant