PHPFixing
  • Privacy Policy
  • TOS
  • Ask Question
  • Contact Us
  • Home
  • PHP
  • Programming
  • SQL Injection
  • Web3.0

Friday, July 29, 2022

[FIXED] How to store an image inside a qr code content offline?

 July 29, 2022     image, qr-code     No comments   

Issue

I want to store an image inside a QR code offline. When the user scans the QR code, the image will automatically show without any network connectivity. Is there a way to do this?


Solution

This is not possible.

QR Code readers are made to decrypt text entries. The only way you have is to put a link in your QR Code which redirects to the image : and that needs connectivity.

Even if you encode your image into data URI, the QR Code will be too big to be correctly read. QR codes are made to encapsulate about 250 characters. A data URI image's length is from about 10,000 to 1,000,000 characters.

And even if it is correctly read (maybe if you used high ECC redondancy to encode it), there is nothing in the reader's application that can read a data URI image. Only a browser can, using CSS styling.

QR Codes were created in a connected environment, to share links easily.

Your only option is to host your image somewhere and then encode the URL inside your QR Code. Those are examples of image hoster :

  • http://tinypic.com/
  • http://postimage.org/


Answered By - Yonn Trimoreau
Answer Checked By - David Goodson (PHPFixing Volunteer)
  • Share This:  
  •  Facebook
  •  Twitter
  •  Stumble
  •  Digg
Newer Post Older Post Home

0 Comments:

Post a Comment

Note: Only a member of this blog may post a comment.

Total Pageviews

Featured Post

Why Learn PHP Programming

Why Learn PHP Programming A widely-used open source scripting language PHP is one of the most popular programming languages in the world. It...

Subscribe To

Posts
Atom
Posts
Comments
Atom
Comments

Copyright © PHPFixing