PHP Classes
elePHPant
Icontem

image

Recommend this page to a friend!

      QR code generator  >  All threads  >  image  >  (Un) Subscribe thread alerts  
Subject:image
Summary:how do i get the binary data of a file?
Messages:11
Author:gggg06
Date:2012-03-09 21:02:50
Update:2014-03-05 01:56:51
 
  1 - 10   11 - 11  

  1. image   Reply   Report abuse  
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");

  2. Re: image   Reply   Report abuse  
Arturs Sosins - 2012-03-10 09:52:06 - In reply to message 2 from gggg06
Hello, here's an example:
webcodingeasy.com/PHP/Get-binary-da ...

  3. Re: image   Reply   Report abuse  
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:
chart.apis.google.com/chart?chs=150 ...

  4. Re: image   Reply   Report abuse  
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.

  5. Re: image   Reply   Report abuse  
gggg06 - 2012-03-13 13:23:25 - In reply to message 5 from Arturs Sosins
Im trying with an gif image 4px by 4px bu I cant get it to work.
Du you have en working code / qr image that i can try?

This is the call url to google...

chart.apis.google.com/chart?chs=150 ...

  6. Re: image   Reply   Report abuse  
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.

  7. Re: image   Reply   Report abuse  
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 :-)

  8. Re: image   Reply   Report abuse  
xmlfor - 2013-06-14 07:05:55 - In reply to message 2 from gggg06
@gggg06 I agree. Info about QR code generator ,check http://www.rasteredge.com/online-barcode-generator/qr-code/

  9. Re: image   Reply   Report abuse  
nathen henderson - 2013-09-24 09:23:33 - In reply to message 9 from xmlfor
QR Code generation info:
onbarcode.com/vb_net/qr-code-genera ...

  10. Re: image   Reply   Report abuse  
Susanna Moore - 2014-03-05 01:56:51 - In reply to message 2 from gggg06
QR Code can encode the following characters:
1. numeric data (digits 0 - 9);
2. alphanumeric data (digits 0 - 9; upper case letters A - Z; nine other characters: space, $ % * + - . / : );
3. byte data (default: ISO/IEC 8859-1; or other sets as otherwise defined); 4. Kanji characters. Kanji characters in QR Code 2005 can be compacted into 13 bits.

related QR Code library:
rasteredge.com/dotnet-imaging/addon ...

 
  1 - 10   11 - 11