Can zxing create QR Codes?

452 views
Skip to first unread message

Ricardo1980

unread,
Jan 4, 2011, 7:17:30 AM1/4/11
to zxing
Hi all!

As you know, zxing is a barcode/qr reader, my question is, can I
create a writer? that is, given an string, returning an image? (a qr
code that represents that string)
Otherwise, do you know a way or a library to create qr codes? I know
there are some apps in the app store as quiQR that can create them.

Thanks a lot for your help.
Ricardo.

Lachezar Dobrev

unread,
Jan 5, 2011, 2:47:59 AM1/5/11
to zx...@googlegroups.com
Nobody has answered, I'm going to take a stab at the question.

The ZXing project is able to generate QR Codes:
http://zxing.googlecode.com/svn/trunk/core/src/com/google/zxing/qrcode/QRCodeWriter.java

The code generates a black-and-white matrix, that you write to
whatever media you need.

This feature is used in the Android application to facilitate
sharing data between Android devices by displaying a QR code on the
source device screen and scanning it on the target device.

However looking at the other questions you ask, I have the feeling,
that you are asking especially for the iOS platform (iPhone). The iOS
project is a port/rewrite and does not contain the same feature set.
And it seems (looking at the source) that image generation has not
been ported/rewritten.

2011/1/4 Ricardo1980 <ricardo_r...@yahoo.es>:

Romain

unread,
Jan 5, 2011, 11:33:04 AM1/5/11
to zxing
That is correct. The qr Code gen has not yet been ported to iOS. My
guess is that the matrix generation should be ported in cpp, and
generating an image based on the matrix should be done in objc

On Jan 5, 8:47 am, Lachezar Dobrev <l.dob...@gmail.com> wrote:
>   Nobody has answered, I'm going to take a stab at the question.
>
>   The ZXing project is able to generate QR Codes:http://zxing.googlecode.com/svn/trunk/core/src/com/google/zxing/qrcod...
>
>   The code generates a black-and-white matrix, that you write to
> whatever media you need.
>
>   This feature is used in the Android application to facilitate
> sharing data between Android devices by displaying a QR code on the
> source device screen and scanning it on the target device.
>
>   However looking at the other questions you ask, I have the feeling,
> that you are asking especially for the iOS platform (iPhone). The iOS
> project is a port/rewrite and does not contain the same feature set.
> And it seems (looking at the source) that image generation has not
> been ported/rewritten.
>
> 2011/1/4 Ricardo1980 <ricardo_ruiz_lo...@yahoo.es>:

Ricardo Ruiz

unread,
Jan 5, 2011, 11:36:23 AM1/5/11
to zx...@googlegroups.com
Thanks for reply!

Why does quiQR (http://www.quiqr.it/) generate QR Codes if it uses zxing (see about screen)?
If they added some features, don't they have to release them (I mean, from a legal point of view)?
Thanks a lot!


De: Lachezar Dobrev <l.do...@gmail.com>
Para: zx...@googlegroups.com
Enviado: mié,5 enero, 2011 08:47
Asunto: Re: Can zxing create QR Codes?

Steven Parkes

unread,
Jan 5, 2011, 11:49:00 AM1/5/11
to zx...@googlegroups.com
The Apache 2 license does not require modifications be contributed.

There are a number of available routines for generating QR matrices. I've used the Psytec encoder (http://groups.google.com/group/zxing/browse_thread/thread/2b5066766f424840/cb39873b66f78190) since nobody (including me) has had time to port the Java encoder. The comments are in Japanese, but with a small understanding of QR codes (version, ecc, mask) it's straightforward and gcc can easily call from Objective C to C++. From the matrix, it's fairly easy to do the necessary rectangle fill calls in a UIView drawRect call.

On Jan 5, 2011, at 8:36 AM, Ricardo Ruiz wrote:

> Thanks for reply!
>
> Why does quiQR (http://www.quiqr.it/) generate QR Codes if it uses zxing (see about screen)?
> If they added some features, don't they have to release them (I mean, from a legal point of view)?
> Thanks a lot!
>

Ricardo Ruiz

unread,
Jan 5, 2011, 11:57:51 AM1/5/11
to zx...@googlegroups.com
Thanks! I didn't see that topic.


De: Steven Parkes <smpa...@smparkes.net>
Para: "zx...@googlegroups.com" <zx...@googlegroups.com>
Enviado: mié,5 enero, 2011 17:49
Reply all
Reply to author
Forward
0 new messages