Want to retrieve QR code in byte array form

12 posts, 0 answers
  1. Mahesh
    Mahesh avatar
    5 posts
    Member since:
    Sep 2013

    Posted 19 Sep 2013 Link to this post

    I want to retrieve QR code in byte array form, is this possible?
    If not what other options could be?

    Thanks,
    Mahesh A
  2. Mahesh
    Mahesh avatar
    5 posts
    Member since:
    Sep 2013

    Posted 20 Sep 2013 Link to this post

    reply ASAP.

    Thanks,
    Mahesh A
  3. Kendo UI is VS 2017 Ready
  4. Daniel
    Admin
    Daniel avatar
    2118 posts

    Posted 23 Sep 2013 Link to this post

    Hello Mahesh A,

    The QRCode widget does not support returning the generated bit array for the value. Could you clarify why this would be needed?

    Regards,
    Daniel
    Telerik
    Join us on our journey to create the world's most complete HTML 5 UI Framework - download Kendo UI now!
  5. Mahesh
    Mahesh avatar
    5 posts
    Member since:
    Sep 2013

    Posted 23 Sep 2013 Link to this post

    Hello Daniel ,
               Thanks for your reply.
    My main aim is to Save the generated QR code in byte array format in Sql server database.
    Is it possible to do so using kendoQRCode control?

    Thanks,
    Mahesh A
  6. Daniel
    Admin
    Daniel avatar
    2118 posts

    Posted 24 Sep 2013 Link to this post

    Hello,

    How would the array be used after it is saved in the database? As I mentioned in my previous reply, the widget does not support returned the generated bit array for the value but if the scenario is valid then we will consider exposing a method that can be used for this purpose.

    Regards,
    Daniel
    Telerik
    Join us on our journey to create the world's most complete HTML 5 UI Framework - download Kendo UI now!
  7. Subha
    Subha avatar
    4 posts
    Member since:
    Mar 2014

    Posted 13 Mar 2014 Link to this post

    Hi there,

    I need the same functionality for my application. I need to save the generated QRCode bitmap into the database. Is it possible?
    The reason I need to do this. The QRCodes can be shared by multiple applications and most of the other applications are old ones developed in VS 2008, they just need to query the database to display the QRCode image.

    Please give me a quick reply. I am licensed user. Thanks
  8. Daniel
    Admin
    Daniel avatar
    2118 posts

    Posted 17 Mar 2014 Link to this post

    Hello,

    Currently it is possible to get the bit matrix with the kendo.dataviz.QRCodeFunctions.encodeData function e.g.
    var qr = $("#myQRCode").data("kendoQRCode");
    var matrix = kendo.dataviz.QRCodeFunctions.encodeData(qr.value(),
        qr.options.errorCorrection, qr.options.encoding);
    We will expose a method on the QR widget if this becomes a common scenario.

    Regards,
    Daniel
    Telerik
     

    DevCraft Q1'14 is here! Watch the online conference to see how this release solves your top-5 .NET challenges. Watch on demand now.

     
  9. Subha
    Subha avatar
    4 posts
    Member since:
    Mar 2014

    Posted 06 May 2014 in reply to Daniel Link to this post

    How to get the byte[] from the bit matrix. Please explain. Thanks
  10. Subha
    Subha avatar
    4 posts
    Member since:
    Mar 2014

    Posted 07 May 2014 Link to this post

    How do I recreate the image using the bit matrix? Or How do I display the same in an image control. I need to allow users to download QRCode image? 
  11. Daniel
    Admin
    Daniel avatar
    2118 posts

    Posted 08 May 2014 Link to this post

    Hello,

    If you wish to export the qr code to an image then I would suggest to use the approach demonstrated for the chart in this code library. With the bit matrix you will need to manually calculate the module size and draw the modules on the server.

    Regards,
    Daniel
    Telerik
     
    Join us on our journey to create the world's most complete HTML 5 UI Framework - download Kendo UI now!
     
  12. Subha
    Subha avatar
    4 posts
    Member since:
    Mar 2014

    Posted 08 May 2014 in reply to Daniel Link to this post

    Can you please explain what do you mean by "With the bit matrix you will need to manually calculate the module size and draw the modules on the server."?

    I have generated the QR Code with size 100. The
    bit matrix i get after using the function kendo.dataviz.QRCodeFunctions.encodeData  is a 21 X 21 matrix. When I used the matrix to draw the bitmap I am getting a very small image. How do I get of size 100?
  13. Daniel
    Admin
    Daniel avatar
    2118 posts

    Posted 09 May 2014 Link to this post

    Hello again,

    I posted my reply in the support ticket that you have opened on the same topic. For convenience I am pasting it below and I attached the project.

    What I meant was that the bit matrix returned by the method does not represent an image but the information that is needed to draw the qr code - the positions of the dark and light modules. Therefore if you wish to use this approach you will need to post this matrix to the server and draw the dark and light modules based on the total size and the matrix values(1 for dark and 0 for light). I attached a sample project that demonstrates this scenario.

    Regards,
    Daniel
    Telerik
     
    Join us on our journey to create the world's most complete HTML 5 UI Framework - download Kendo UI now!
     
Back to Top
Kendo UI is VS 2017 Ready