can anybody give me a windows CE version zxing.net?

Sep 19, 2012 at 2:35 AM

as the title i say,wo compile the zxing.net ,and modify a wince version.but like the bmp.pixelFormat not support in WINCE,and other many not support. i modify them.but when i run a test in wince,the zxing.net cannot  recgnize the barcode and run time is very long .so anybody ever run the zxing.net in windows ce?can you give a dll?

thanks !

Coordinator
Sep 19, 2012 at 6:11 AM

Sorry, I can't, at the moment.

I only built a version for the .Net Micro Framework which you can found in the source code repository under a different branch:
https://zxingnet.svn.codeplex.com/svn/branches/NETMF

Perhaps I can give you some hints for performance:

  • try to scan only a fixed type of barcode. Set the property PossibleFormats only with one specific barcode format.
    If you do so, the barcode reader doesn't try to find every possible and supported format which results in better performance.
          barcodeReader.PossibleFormats = new List<BarcodeFormat>();
          barcodeReader.PossibleFormats.Add(BarcodeFormat.QR_CODE);
  • try the GlobalHistogramBinarizer instead of the HybridBinarizer (it's the default if you use the BarcodeReader class). The GlobalHistogramBinarizer is faster but not so accurat.
          IBarcodeReader barcodeReader = new BarcodeReader(null, null, (luminanceSource) => new ZXing.Common.GlobalHistogramBinarizer(luminanceSource));
    If wince doesn't support lambda expression you have to use a delegate.

I will try to built a "official" wince version of ZXing.Net. But this can take a little while. As I know I have to install VS 2008 first and some other dependencies.
And I have no wince device to check the results. Hopefully there is an emulator.
Can you give me some information about your environment. Which version of Windows CE and the Compact Framework? What device? What types of barcodes you want to scan?

Perhaps you have another chance besides ZXing.Net. The original java based zxing project at http://code.google.com/p/zxing/ provides a c++ port of zxing.
I'm not sure but I think that should also work with wince.

Coordinator
Sep 21, 2012 at 8:09 PM
Edited Sep 21, 2012 at 8:11 PM

I added a solution and project files for Windows CE .Net 2.0 and .Net 3.5. I modified the sources so you can build your own binary directly from the source code repository.

Sep 27, 2012 at 2:01 AM
micjahn wrote:

I added a solution and project files for Windows CE .Net 2.0 and .Net 3.5. I modified the sources so you can build your own binary directly from the source code repository.

hi micjahn, 

    thanks your help,i try you solution in my device,the result is same as mine.it also can not recgnize qrcode.well i modify as you said:

 barcodeReader.PossibleFormats = new List<BarcodeFormat>();
      barcodeReader.PossibleFormats.Add(BarcodeFormat.QR_CODE);

 

the recgnize time is about 10s.but is also can not recgnize the qrcode img. the img source i used the dirctionary:

D:\zxingnet\Source\test\data\blackbox\qrcode-1

================

i used the zxing.ce.sln,and my wince device is samsang ARM11 S3C6410 CPU with 667MHZ,and the OS is mircosoft Windows CE6.0 R3. and my test QRcode to read.

maybe you can test as me said as PC simulator.

i hope you can help this.

by the way ,these days i try modify the zxing c# sourcecode in myself,it can used in my wince device,but is used more time.a img with 640*480,it read the img used 1minute,it is too long. so  i hope you have a good news . then i can use this project zxing.net.

best regard!

Coordinator
Sep 27, 2012 at 5:57 AM

Can you send me a sample project with which you try to decode the barcode?

Sep 27, 2012 at 6:54 AM

how send you?micjahn. where your email?

Coordinator
Sep 27, 2012 at 9:10 AM

I send you a message through the contact formular. You should now have my email address.

Sep 27, 2012 at 10:43 AM
hi micjahn,
sorry,i am not good at used codeplex.com,well the attachments is my test program which modified by your WindowsFormsDemo.


From: [email removed]
To: [email removed]
Date: Thu, 27 Sep 2012 02:10:51 -0700
Subject: Re: can anybody give me a windows CE version zxing.net? [ZXingNet:396017]

From: micjahn
I send you a message through the contact formular. You should now have my email address.
Read the full discussion online.
To add a post to this discussion, reply to this email (ZXingNet@discussions.codeplex.com)
To start a new discussion for this project, email ZXingNet@discussions.codeplex.com
You are receiving this email because you subscribed to this discussion on CodePlex. You can unsubscribe on CodePlex.com.
Please note: Images and attachments will be removed from emails. Any posts to this discussion will also be available online at CodePlex.com
Coordinator
Oct 3, 2012 at 8:09 PM

I added a WindowsCE example to the source code repository.

Nov 8, 2012 at 4:48 AM

Hi. Here too for a .NET Compact Framework version of ZXing. I need to encode/decode QR Code in Windows Mobile. Unfortunately, I havent come up with anything to help me on this. Thanks.

Nov 8, 2012 at 5:04 AM
if you encode ,you can use libencode lib,and decode ,you can use zxingnet. well,now you find zxingnet,you download the zxingnet cf version,it is ok. you must read the web page about zxingnet.codeplex.com first.




From: [email removed]
To: [email removed]
Date: Wed, 7 Nov 2012 21:48:43 -0800
Subject: Re: can anybody give me a windows CE version zxing.net? [ZXingNet:396017]

From: thejeraldo
Hi. Here too for a .NET Compact Framework version of ZXing. I need to encode/decode QR Code in Windows Mobile. Unfortunately, I havent come up with anything to help me on this. Thanks.
Read the full discussion online.
To add a post to this discussion, reply to this email (ZXingNet@discussions.codeplex.com)
To start a new discussion for this project, email ZXingNet@discussions.codeplex.com
You are receiving this email because you subscribed to this discussion on CodePlex. You can unsubscribe on CodePlex.com.
Please note: Images and attachments will be removed from emails. Any posts to this discussion will also be available online at CodePlex.com
Nov 8, 2012 at 10:00 AM
Edited Nov 8, 2012 at 10:44 AM

Im trying the ce3.5 one on my project. and Im having a problem with
var barcodeBitmap = (Bitmap)Bitmap.LoadFrom("C:\\sample-barcode-image.png");

as LoadFrom is not included in Bitmap in .NET CF.
can you help me on this one please? 

***Update***

never mind my post above. just got it working by passing a png to bitmap.

anyways, can you give me help on the encoding?

Coordinator
Nov 8, 2012 at 9:03 PM

Steps for Windows CE:

  • download the ZXing.Net.0.9.0.0-WindowsCE-Hotfix-V2.zip from the download page http://zxingnet.codeplex.com/downloads/get/498456
  • checkout the Windows CE demo application from the source code repository https://zxingnet.svn.codeplex.com/svn/trunk/Clients/WindowsCEDemo
  • encoding is as easy as decoding:
          private System.Windows.Forms.PictureBox picBarcode;
    
          private Bitmap Encode(string text, BarcodeFormat format)
          {
             var writer = new BarcodeWriter { Format = format };
             return writer.Write(text);
          }
    
          private void btnStartEncoding_Click(object sender, EventArgs e)
          {
             var bitmap = Encode(txtContent.Text, BarcodeFormat.QR_CODE);
             picBarcode.Image = bitmap;
          }
    
Nov 8, 2012 at 11:36 PM
well��i suggest you first,you can try the windows version.you know the program how run,then you used the wince version.

by the way,actely,the windows version and wince version method is same.


From: [email removed]
To: [email removed]
Date: Thu, 8 Nov 2012 03:00:53 -0800
Subject: Re: can anybody give me a windows CE version zxing.net? [ZXingNet:396017]

From: thejeraldo
Im trying the ce3.5 one on my project. and Im having a problem with
var barcodeBitmap = (Bitmap)Bitmap.LoadFrom("C:\\sample-barcode-image.png");
as LoadFrom is not included in Bitmap in .NET CF.
can you help me on this one please?
Read the full discussion online.
To add a post to this discussion, reply to this email (ZXingNet@discussions.codeplex.com)
To start a new discussion for this project, email ZXingNet@discussions.codeplex.com
You are receiving this email because you subscribed to this discussion on CodePlex. You can unsubscribe on CodePlex.com.
Please note: Images and attachments will be removed from emails. Any posts to this discussion will also be available online at CodePlex.com
Nov 9, 2012 at 4:49 AM
Edited Nov 9, 2012 at 10:42 AM

Thanks. Got encoding to work finally. 

But is there a way to set the correction level and version of QR Code to encode?

Coordinator
Nov 9, 2012 at 6:36 PM

You can set the correction level with the option property:

      private System.Windows.Forms.PictureBox picBarcode;

      private Bitmap Encode(string text, BarcodeFormat format, EncodingOptions options)
      {
         var writer = new BarcodeWriter
         {
            Format = format,
            Options = options
         };
         return writer.Write(text);
      }

      private void btnStartEncoding_Click(object sender, EventArgs e)
      {
         var bitmap = Encode(txtContent.Text, BarcodeFormat.QR_CODE, new QrCodeEncodingOptions { ErrorCorrection = ErrorCorrectionLevel.Q });
         picBarcode.Image = bitmap;
      }
You can't set the version. It is automatically determined and depends at the amount of data and the encoding mode.

 

Nov 10, 2012 at 6:46 AM

I see. Im just getting some weird results. Once I scan a QR Code and return a value. I try converting that value to a QR Code again and it returns a different looking QR COde. do you have any idea about that?

Coordinator
Nov 11, 2012 at 10:51 AM

That can happen.

The same text can be encoded in different ways which result in different looking QR codes.
It is only important that both codes give the same result if you decode them.

Some more detail. If you have normal text then the text can be encoded in two ways: with character encoding and byte encoding.
It depends on different things like the character set which is used (UTF-8, ISO-8859-1 or Windows-1252 like in WinCE).
If you use another character set than ISO-8859-1 the encoder will add a hint into the code so that the decoder chooses the
right character set for decoding. The encoding mode is automatically choosen by zxing.

You can check that out if you set the QrCodeEncodingOptions.CharacterSet with a different value.

As I said before it is not important how the code looks. It is only important that it gives the correct result.

Nov 12, 2012 at 12:06 PM

I see. Thanks for the enlightenment. Thanks for all the help guys! :)