EzDev.org

zxing

zxing - ZXing ("Zebra Crossing") barcode scanning library for Java, Android


Using ZXing to create an android barcode scanning app [duplicate]

This question already has an answer here:

I've been searching on how to add a barcode scanner to my app. Does anybody know of any examples or know how to do this easily?


Source: (StackOverflow)

google.zxing barcode generator in iReport

I want put a barcode in my page and can preview it. The barcode generator is google.zxing and my reporting tool is iReport.

But i dont know, how to configure Image Expression and Expression Class of an image in iReport.


Source: (StackOverflow)

How to use Zxing in android [duplicate]

This question already has an answer here:

I am new to Zxing. I am doing barcode conversion using zxing in my android application. Can anyone guide me how to include zxing to android device.


Source: (StackOverflow)

Getting Camera error in Zxing Barcode Application

I am trying to use Zxing Library for developing a barcode scanner.

My activity is as follows:

public class Scanner extends Activity {  

    private static final String PACKAGE = "com.test.scan";  
    private static final String SCANNER = "com.google.zxing.client.android.SCAN";  
    private static final String SCAN_FORMATS = "UPC_A,UPC_E,EAN_8,EAN_13,CODE_39,CODE_93,CODE_128";  
    private static final String SCAN_MODE = "QR_CODE_MODE";  
    public static final int REQUEST_CODE = 1;  

    @Override  
    public void onCreate(Bundle icicle) {  
        super.onCreate(icicle);  

        setContentView(R.layout.main);  

         Button ok;  
         ok = (Button) findViewById(R.id.b1);  
         ok.setOnClickListener(new View.OnClickListener() {  

             public void onClick(View v) {  

                Intent scanIntent = new Intent(SCANNER);  
                scanIntent.setPackage(PACKAGE);  
                scanIntent.addCategory(Intent.CATEGORY_DEFAULT);  
                scanIntent.putExtra("SCAN_FORMATS", SCAN_FORMATS);  
                scanIntent.putExtra("SCAN_MODE", SCAN_MODE);  
                try {  
                    startActivityForResult(scanIntent, REQUEST_CODE);  
                } catch (ActivityNotFoundException e) {  
                     // TODO: Exception handling  
                }  
            }  

        });  
     }

Also manifest file:

    <activity android:name=".Scanner"
            android:screenOrientation="landscape"   android:configChanges="orientation|keyboardHidden"
            android:theme="@android:style/Theme.NoTitleBar.Fullscreen"
            android:windowSoftInputMode="stateAlwaysHidden">  
                 <intent-filter>
                <action android:name="android.intent.action.MAIN" />
                <category android:name="android.intent.category.LAUNCHER" />  
            </intent-filter>

</activity>

<activity android:name="com.google.zxing.client.android.CaptureActivity"
                android:screenOrientation="landscape" android:configChanges="orientation|keyboardHidden"  
                android:theme="@android:style/Theme.NoTitleBar.Fullscreen"
                android:windowSoftInputMode="stateAlwaysHidden">
                <intent-filter>
                    <action     android:name="com.google.zxing.client.android.SCAN" />
                    <category    android:name="android.intent.category.DEFAULT" />
                </intent-filter>
            </activity>
            <activity android:name="com.google.zxing.client.android.PreferencesActivity"
                android:label="@string/preferences_name">
            </activity>
            <activity android:name="com.google.zxing.client.android.HelpActivity"
                android:screenOrientation="user">
                <intent-filter>
                    <action android:name="android.intent.action.VIEW" />
                    <category android:name="android.intent.category.DEFAULT" />
                </intent-filter>
            </activity>
            <activity android:name="com.google.zxing.client.android.share.ShareActivity"
                android:label="@string/share_name" android:screenOrientation="user"
                android:theme="@android:style/Theme.Light">
                <intent-filter>
                    <action android:name="com.google.zxing.client.android.SHARE" />
                    <category android:name="android.intent.category.DEFAULT" />
                </intent-filter>
            </activity>
    <uses-permission android:name="android.permission.CAMERA"

But I am getting the following error:

"Sorry, the Android camera encountered a problem. You may need to restart the device".

I have followed few blogs.

Log:

   Unexpected error initializating camera  
    01-27 10:40:48.281: WARN/CaptureActivity(1007): java.lang.RuntimeException: Fail to connect to camera service  
    01-27 10:40:48.281: WARN/CaptureActivity(1007):     at android.hardware.Camera.native_setup(Native Method)  
    01-27 10:40:48.281: WARN/CaptureActivity(1007):     at android.hardware.Camera.<init>(Camera.java:185)  
    01-27 10:40:48.281: WARN/CaptureActivity(1007):     at android.hardware.Camera.open(Camera.java:165)
   01-27 10:40:48.281: WARN/CaptureActivity(1007):     at com.google.zxing.client.android.camera.CameraManager.openDriver(CameraManager.java:126)
    01-27 10:40:48.281: WARN/CaptureActivity(1007):     at com.google.zxing.client.android.CaptureActivity.initCamera(CaptureActivity.java:606)  
    01-27 10:40:48.281: WARN/CaptureActivity(1007):     at com.google.zxing.client.android.CaptureActivity.surfaceCreated(CaptureActivity.java:346)   
    01-27 10:40:48.281: WARN/CaptureActivity(1007):     at android.view.SurfaceView.updateWindow(SurfaceView.java:532)  
    01-27 10:40:48.281: WARN/CaptureActivity(1007):     at android.view.SurfaceView.dispatchDraw(SurfaceView.java:339) 

Source: (StackOverflow)

Android ZXing Get Barcode Image

I am using Zxing library to generate a barcode in my Android application

Intent intent = new Intent("com.google.zxing.client.android.ENCODE");

intent.putExtra("ENCODE_FORMAT", "UPC_A");
intent.putExtra("ENCODE_DATA", "55555555555");

startActivityForResult(intent,0);

Is there anyway to save the generated image in my application which is calling Zxing? I see that in my onActivityResult I get intent null.

Thanks in advance for your help


Source: (StackOverflow)

ZXing how to scan QR-Code AND 1D barcode?

I just imported the ZXing library in my app, I know how to set up the putExtra function to scan QR-Code barcode:

INTENT = new Intent("com.google.zxing.client.android.SCAN");
INTENT.putExtra("SCAN_MODE", "QR_CODE_MODE");
startActivityForResult(INTENT, 0);

and if I like to scan a 1D barcode:

INTENT = new Intent("com.google.zxing.client.android.SCAN");
INTENT.putExtra("SCAN_MODE", "PRODUCT_MODE");
startActivityForResult(INTENT, 0);

but how do I make the App able to scan both?? (1D and 2D barcode).

Thanks! Marco


Source: (StackOverflow)

Integrating the ZXing library directly into my Android application

I'm writing this in mere desperation :) I've been assigned to make a standalone barcode scanner (as a proof of concept) to an Android 1.6 phone.

For this i've discovered the ZXing library.

I've googled, read related topics here on StackOverflow used common sence and so forth. Nothing seemed to have helped, and i just can't punch a hole on this mentale blockade :/

I know it to be possible, to use the lib, and create your own standalone barcode scanner. I've read that using the "Barcode Scanner" provided by the Zxing folks, is by far the easiest solution (via Intent). Unfortunately this is not an option, and a standalone app is desired.

So to sum up my problem :

  1. How to integrate ZXing source lib into my Android Code project through Eclipse?
  2. When integrated ... how to make use of the lib, to "load" the scanning function?
  3. A step to step guide is almost prefered because i just started working in Eclipse.

I've tried to make my code project dependant of the Android folder from the ZXing source folder. When i do so, a handfull errors emerge, mostly concerning 'org.apache' (??)

I just can't figure it out ... so a few hints would be most helpfull.

In advance, thank you :)


Source: (StackOverflow)

Integrate ZXing in Android Studio

I'll start explaining all the steps I have done and in the end what is the problem.

  1. Download ZXing-2.2 https://code.google.com/p/zxing/downloads/list
  2. Extrac all in zxing-2.2.
  3. Download and install Apache Ant http://www.youtube.com/watch?v=XJmndRfb1TU
  4. With the use of Windows Commandline (Run->CMD) navigate to the extracted directory
  5. In the commandline window - Type 'ant -f core/build.xml' press enter and let Apache work it's magic

At this moment is like Integrating the ZXing library directly into my Android application

But Wooops, "Buildfile: core\build.xml does not exists! Build failed. ok. 6. Importing ZXing - missing core/build.xml

Now yes, i have my core.jar.

  1. Open Android Studio, File -> Import Project -> Select /android/ in /zxing-2.2/ -> Create project from existing sources -> Project name: andoid -> Source files for... all checked Next -> Libraries (cant do nothing) Next -> Modules (android checked) Next -> SDK 1.7 Next -> Finish

With Project Open -> Build -> Rebuild project

100 errors 19 warnings

File -> project Structure -> Libraries -> Add -> Java -> Select core.jar that i create before and OK -> Library 'core' will be added to the selected modules. (android) OK -> And OK in the Project Structure Dialog.

Build -> Rebuild Project

15 errors 20 warnings

All errors are error: constant expression required and I see Error in Switch cases of ZXing project in android I change all switchs for if elses.

0 errors 20 warnings

Ok, now continue:

File -> New project -> zxing_demo Next -> Next -> Blank Activity Next -> Finish

In new project -> File -> Import module -> Search and select /android/ OK -> Create module from existing sources Next -> Next -> Next -> Next -> Finish

Now I can see in the explorer /android/ /zging_demoProject/ and External Libraries

Now i change my code tu scan QR

AndroidManifest.xml

<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="com.example.zxing_demo"
android:versionCode="1"
android:versionName="1.0" >

<uses-sdk
    android:minSdkVersion="7"
    android:targetSdkVersion="16" />
<uses-permission android:name="android.permission.CAMERA"/>
<uses-feature android:name="android.hardware.camera" />
<uses-feature
    android:name="android.hardware.camera.autofocus"
    android:required="false" />
<uses-feature
    android:name="android.hardware.touchscreen"
    android:required="false" />
<application
    android:allowBackup="true"
    android:icon="@drawable/ic_launcher"
    android:label="@string/app_name"
    android:theme="@style/AppTheme" >
    <activity
        android:name="com.example.zxing_demo.MainActivity"
        android:label="@string/app_name" >
        <intent-filter>
            <action android:name="android.intent.action.MAIN" />

            <category android:name="android.intent.category.LAUNCHER" />
        </intent-filter>
    </activity>
    <activity
        android:clearTaskOnLaunch="true"
        android:stateNotNeeded="true"
        android:configChanges="orientation|keyboardHidden"
        android:name="com.google.zxing.client.android.CaptureActivity"
        android:screenOrientation="landscape"
        android:theme="@android:style/Theme.NoTitleBar.Fullscreen"
        android:windowSoftInputMode="stateAlwaysHidden" >
        <intent-filter >
            <action android:name="android.intent.action.MAIN" />
            <category android:name="android.intent.category.DEFAULT" />
        </intent-filter>
        <intent-filter >
            <action android:name="com.google.zxing.client.android.SCAN" />
            <category android:name="android.intent.category.DEFAULT" />
        </intent-filter>
    </activity>
</application>

MainActivity.java

package com.example.zxing_demo;

import android.app.Activity;
import android.content.Intent;
import android.os.Bundle;

public class MainActivity extends Activity {

@Override
protected void onCreate(Bundle savedInstanceState) {
    super.onCreate(savedInstanceState);
    setContentView(R.layout.activity_main);
    Intent intent = new Intent("com.google.zxing.client.android.SCAN");
    intent.putExtra("SCAN_MODE", "QR_CODE_MODE");
    startActivityForResult(intent, 0);
}


public void onActivityResult(int requestCode, int resultCode, Intent intent) {
    if (requestCode == 0) {
        if (resultCode == RESULT_OK) {
            String contents = intent.getStringExtra("SCAN_RESULT");
            String format = intent.getStringExtra("SCAN_RESULT_FORMAT");
            // Handle successful scan
        } else if (resultCode == RESULT_CANCELED) {
            // Handle cancel
        }
    }
}

}

Now test, Run -> Debug

And CRASH.

Logcat

08-31 02:58:28.085  20665-20665/com.example.zxing_demo E/AndroidRuntime: FATAL EXCEPTION: main
    java.lang.RuntimeException: Unable to instantiate activity ComponentInfo{com.example.zxing_demo/com.google.zxing.client.android.CaptureActivity}: java.lang.ClassNotFoundException: com.google.zxing.client.android.CaptureActivity
    at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:1891)
    at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:1992)
    at android.app.ActivityThread.access$600(ActivityThread.java:127)
    at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1158)
    at android.os.Handler.dispatchMessage(Handler.java:99)
    at android.os.Looper.loop(Looper.java:137)
    at android.app.ActivityThread.main(ActivityThread.java:4448)
    at java.lang.reflect.Method.invokeNative(Native Method)
    at java.lang.reflect.Method.invoke(Method.java:511)
    at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:823)
    at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:590)
    at dalvik.system.NativeStart.main(Native Method)
    Caused by: java.lang.ClassNotFoundException: com.google.zxing.client.android.CaptureActivity
    at dalvik.system.BaseDexClassLoader.findClass(BaseDexClassLoader.java:61)
    at java.lang.ClassLoader.loadClass(ClassLoader.java:501)
    at java.lang.ClassLoader.loadClass(ClassLoader.java:461)
    at android.app.Instrumentation.newActivity(Instrumentation.java:1023)
    at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:1882)
    ... 11 more

I can see in AndroidManifest.xml in this line

android:name="com.google.zxing.client.android.CaptureActivity"

"CaptureActivity" in red and the error say: Cannot resolve symbol 'CaptureActivity'

File -> Project Structure -> Modules -> zxing_demo -> Dependencies -> Add -> Module dependency -> android OK -> Apply and OK

Now CaptureActivity looks good

Debug again

08-31 03:06:58.513  21740-21740/com.example.zxing_demo E/AndroidRuntime: FATAL EXCEPTION: main
    java.lang.RuntimeException: Unable to instantiate activity ComponentInfo{com.example.zxing_demo/com.google.zxing.client.android.CaptureActivity}: java.lang.ClassNotFoundException: com.google.zxing.client.android.CaptureActivity
    at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:1891)
    at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:1992)
    at android.app.ActivityThread.access$600(ActivityThread.java:127)
    at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1158)
    at android.os.Handler.dispatchMessage(Handler.java:99)
    at android.os.Looper.loop(Looper.java:137)
    at android.app.ActivityThread.main(ActivityThread.java:4448)
    at java.lang.reflect.Method.invokeNative(Native Method)
    at java.lang.reflect.Method.invoke(Method.java:511)
    at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:823)
    at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:590)
    at dalvik.system.NativeStart.main(Native Method)
    Caused by: java.lang.ClassNotFoundException: com.google.zxing.client.android.CaptureActivity
    at dalvik.system.BaseDexClassLoader.findClass(BaseDexClassLoader.java:61)
    at java.lang.ClassLoader.loadClass(ClassLoader.java:501)
    at java.lang.ClassLoader.loadClass(ClassLoader.java:461)
    at android.app.Instrumentation.newActivity(Instrumentation.java:1023)
    at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:1882)
    ... 11 more

I think I will use the application and intents, but now I want do this work, if someone now whats happen tell me please.


Source: (StackOverflow)

Embed Zxing library without using Barcode Scanner app [duplicate]

This question already has an answer here:

What is the preferred way to embed the zxing library to provide scanning without having the Barcode Scanner app installed? I am looking to embed it in android without having to prompt the user for any extra installs. (Similar to the way the iPhone src works).


Source: (StackOverflow)

Alternative to zxing QR reader library for Java/Android? [closed]

Is there any other library other than Zxing that can be used to create a QR code reader EVEN IF IT'S NOT FREE.

of-course a free one will be great. but I'm also willing to pay to get a library that's easy in customization and to save time.

thank you.


Source: (StackOverflow)

QR code reader for iPhone

I want to create QR code reader based application.

Using which library, I can create my application ?

Note: I searched in google. Always I am getting zxing. I downloaded the zxing project. But the problem is; I run the application. But it is reading only the Barcodes. There is no option to read QR code.

Please tell me how to do this...

Thanks in Advance.


Source: (StackOverflow)

How to decode a QR-code image in (preferably pure) Python?

TL;DR: I need a way to decode a QR-code from an image file using (preferable pure) Python.

I've got a jpg file with a QR-code which I want to decode using Python. I've found a couple libraries which claim to do this:

PyQRCode (website here) which supposedly can decode qr codes from images by simply providing a path like this:

import sys, qrcode
d = qrcode.Decoder()
if d.decode('out.png'):
    print 'result: ' + d.result
else:
    print 'error: ' + d.error

So I simply installed it using sudo pip install pyqrcode. The thing I find strange about the example code above however, is that it only imports qrcode (and not pyqrcode though) Since I think qrcode refers to this library which can only generate qr-code images it kind of confused me. So I tried the code above with both pyqrcode and qrcode, but both fail at the second line saying AttributeError: 'module' object has no attribute 'Decoder'. Furthermore, the website refers to Ubuntu 8.10 (which came out more than 6 years ago) and I can't find a public (git or other) repository of it to check the latest commit. So I moved on to the next library:

ZBar (website here) claims to be "an open source software suite for reading bar codes from various sources, such as image files." So I tried installing it on Mac OSX running sudo pip install zbar. This fails with error: command 'cc' failed with exit status 1. I tried to suggestions in the answers to this SO question, but I can't seem to solve it. So I decided to move on again:

QRTools, which according to this blogpost can decode images easily by using the following code:

from qrtools import QR
myCode = QR(filename=u"/home/psutton/Documents/Python/qrcodes/qrcode.png")
if myCode.decode():
  print myCode.data
  print myCode.data_type
  print myCode.data_to_string()

So I tried installing it using sudo pip install qrtools, which can't find anything. I also tried it with python-qrtools, qr-tools, python-qrtools and a couple more combinations, but unfortunately to no avail. I suppose it refers to this repo which says it is based on ZBar (see above). Although I want to run my code on Heroku (and thus prefer a pure Python solution) I successfully installed it on a Linux box (with sudo apt-get install python-qrtools) and tried running it:

from qrtools import QR
c = QR(filename='/home/kramer65/qrcode.jpg')
c.data  # prints u'NULL'
c.data_type  # prints u'text'
c.data_to_string()  # prints '\xef\xbb\xbfNULL' where I expect an int (being `1234567890`)

Although this seems to decode it, It doesn't seem to do it correctly. It furthermore needs ZBar and is thus not pure Python. So I decided to find yet another library.

PyXing (website here) is supposedly a Python port of the popular Java ZXing library, but the initial and only commit is 6 years old and the project has no readme or documentation whatsoever.

For the rest I found a couple qr-encoders (not decoders) and some API endpoints which can decode for you. Since I don't like this service to be dependent on other API endpoints I would want to keep the decoding local though.

So to conclude; would anybody know how I can decode QR-codes from images in (preferable pure) Python? All tips are welcome!


Source: (StackOverflow)

Undefined symbols for architecture armv7 when using ZXing library in XCode 4.5

What I am trying to do

Integrate Zxing, QR code reader framework, in my iPhone project. I checked out ZXing sdk from here. I ran the sample project coming with ZXing, named ScanTest, without any issues. But when I try to integrate the library with my project I am getting the error mentioned.

Project specification

  • Target OS : iOS 6.0
  • Deployment target : iOS 5.0 or above.
  • Tested on : iPhone 4 and iPhone 3GS.
  • XCode : Xcode 4.5.1
  • ZXing version : 2.0

Problem

When I build, after doing every integration steps in ZXing readme file, I am getting build errors like

Undefined symbols for architecture armv7:
  "std::basic_ostream<char, std::char_traits<char> >& std::operator<<<std::char_traits<char> >(std::basic_ostream<char, std::char_traits<char> >&, char const*)", referenced from:
      zxing::qrcode::Detector::computeDimension(zxing::Ref<zxing::ResultPoint>, zxing::Ref<zxing::ResultPoint>, zxing::Ref<zxing::ResultPoint>, float) in libZXingWidget.a(Detector-B8B28E953F840D47.o)

Undefined symbols for architecture armv7:
"std::basic_string<char, std::char_traits<char>, std::allocator<char> >::basic_string(char const*, std::allocator<char> const&)", referenced from:
      zxing::Exception::Exception(char const*) in libZXingWidget.a(Exception.o)
      zxing::common::StringUtils::guessEncoding(unsigned char*, int, std::map<unsigned int, std::string, std::less<unsigned int>, std::allocator<std::pair<unsigned int const, std::string> > >

There are 27 errors like that.. I only copied the first two.

What did I found out

Well, I went through this, this ,this ,this, this, this,this threads in stackoverflow, all with the same error message. None of the solutions worked for me.

Then I found this closed thread in ZXing forums discussing the same issue. From that discussion, some possible solutions are (worked for some)

The first error is (probably) because you haven't renamed main.m to main.mm. The second error is (probably) because you're not linking against the widget library

I also renamed my main.m, cross checked whether I have added the library only to find I surely had. So this is not the case.

After I changed the Architectures of the library to "Standard (armv7, armv7s)" to match my main project I was able to successfully compile the app.

My project, target, library project (for debug, distribution, release) architecture is given as Standard (armv7, armv7s). So no luck there either.

Then they closed the issue saying this,

The zxing projects have been updated to add the armv7s arch and remove the armv6 arch. These changes are required (1) to build for the iPhone 5 which is armv7s and (2) to build at all since Xcode 4.5 does not include support for armv6. If you have your own project files, you'll need to make these changes yourself. These are general changes not specific to zxing so if you have trouble, you make get more/quicker help in a general forum like StackOverflow.

So here I am, in StackOverflow.

One more point

In ZXing integration README file , the first step in integration is,

1) Locate the "ZXingWidget.xcodeproj" file under "zxing/iphone/ZXingWidget/". Drag ZXingWidget.xcodeproj and drop it onto the root of your Xcode project's "Groups and Files" sidebar. A dialog will appear -- make sure "Copy items" is unchecked and "Reference Type" is "Relative to Project" before clicking "Add". Alternatively you can right-click on you project navigator and select 'Add files to "MyProject"'.

When I dragged the ZXingWidget.xcodeproj file to my project, there was no dialog. The project directly added to the project and I could not set, "copy items" and "Reference Type" properties. I don't know it is a new feature of xcode 4.5 or a bug. That is the only step I couldn't correctly follow as per the README file.

Well, you have all information that I have with me. I am trying to fix this for 6 hours. Any idea?


Source: (StackOverflow)

Android Zxing change orientation to portrait

I'm trying to rotate Zxing display after reading a few questions and posts about the issue. After following the instructions, the display did rotate, but the rectangle of the scanner is not positioned as it should (as can be seen on the image attached).

This is what I have done:

  1. in CameraConfigurationManager:

    camera.setDisplayOrientation(90);
    
  2. in DecodeHandler.java

    byte[] rotatedData = new byte[data.length];
        for (int y = 0; y < height; y++) {
            for (int x = 0; x < width; x++)
                 rotatedData[x * height + height - y - 1] = data[x + y * width];
         }
    int tmp = width;         
    width = height;
    height = tmp;
    
  3. in CameraManager.java:

    rect.left = rect.left * cameraResolution.y / screenResolution.x;
    rect.right = rect.right * cameraResolution.y / screenResolution.x;
    rect.top = rect.top * cameraResolution.x / screenResolution.y;
    rect.bottom = rect.bottom * cameraResolution.x / screenResolution.y;
    

enter image description here


Source: (StackOverflow)

Reduce border width on QR Codes generated by ZXing?

I'm using com.google.zxing.qrcode.QRCodeWriter to encode data and com.google.zxing.client.j2se.MatrixToImageWriter to generate the QR Code image. On a 400x400 image, there is about a 52 pixel wide border around the code. I'd like this border to be narrower, maybe 15 pixels, but I don't see anything in the API for doing that. Am I missing something in the documenation? Or would I need to process the image myself?

For reference, here is an example 400x400 QR Code produced with the ZXing library:

An example QR Code


Source: (StackOverflow)