|
|
 gggg06 | 2012-03-09 21:02:50 |
//encoding files like gif, jpg midi files in QR codes
//First parameter type - QR codes for support (image/gif, image/jpeg, application/x-mld, audio/midi, audio/mid, application/x-toruca)
//Second parameter size of file - the total bytes of content data using decimal code
//Third parameter content itself - Designate the content data using binary code
//$qr->content("image/gif", "1385", "zzz");
|
 gggg06 | 2012-03-09 21:03:20 |
//encoding files like gif, jpg midi files in QR codes
//First parameter type - QR codes for support (image/gif, image/jpeg, application/x-mld, audio/midi, audio/mid, application/x-toruca)
//Second parameter size of file - the total bytes of content data using decimal code
//Third parameter content itself - Designate the content data using binary code
//$qr->content("image/gif", "1385", "zzz");
|
 gggg06 | 2012-03-10 13:44:26 - In reply to message 3 from Arturs Sosins |
Thanks but I dont get it to work. Result is an broken image.
Any suggestions?
My code:
$thefile = file_get_contents('http://www.infoom.se/qrcode/binfile.php');
$thefilez = filesize ("./file.gif");
$qr->content("image/gif", $thefilez, $thefile);
The image url:
http://chart.apis.google.com/chart?chs=150x150&cht=qr&chld=L ... |
 Arturs Sosins | 2012-03-10 19:52:51 - In reply to message 4 from gggg06 |
| There is a limitation of characters that QR code can store, I think that Google API support is even lesser. I can't tell you what is the limit right now, but I'd suggest to start experimenting with smaller images. |
 Arturs Sosins | 2012-03-13 14:11:25 - In reply to message 6 from gggg06 |
Sorry, but it seems that even 1px image (that I've tried right now) seems to be too large for Google Chart API to handle.
Well, at the time I wrote the class, which was more than 2 years ago, there were no compatible reader, to read the content as gif, jpg, so I haven't tried that with this class, I was only implementing standards described Google Chart API and QR code creators.
It seems now that some of them were changed and not all have been adopted by majority, so I don't even know if there is a compatible tool to decode an image. But it worked as a proof of concept on custom QR code creater with specific reader app. |
 gggg06 | 2012-03-13 15:47:11 - In reply to message 7 from Arturs Sosins |
OK Then i ll put the image function on ice :-)
Everythink else works fine anyway so thanks 4 the class and your time :-) |
|