Spelt / ZXing.Delphi

ZXing Barcode Scanning object Pascal Library for Delphi VCL and Delphi Firemonkey
Apache License 2.0
473 stars 206 forks source link

Implement ITF #2

Closed pbhofstede closed 8 years ago

pbhofstede commented 8 years ago

Whow, I love your work already! No binaries needed if you want to deploy on android or ios. QR-code scanning is working like a charm. The ZXing barcode app can scan my ITF-barcode. Can we implement this together in ZXing.Delphi? If you can decompile it to Delphi.net I will try to convert it to Delphi FMX/VCL

Spelt commented 8 years ago

Thanks!

Sounds like fun. I'll send you the decompiled code in a few hours.

Op 16 dec. 2015 om 10:57 heeft pbhofstede notifications@github.com het volgende geschreven:

Whow, I love your work already! No binaries needed if you want to deploy on android or ios QR-code scanning is working like a charm The ZXing barcode app can scan my ITF-barcode Can we implement this together in ZXingDelphi? If you can decompile it to Delphinet I will try to convert it to Delphi FMX/VCL

— Reply to this email directly or view it on GitHub.

Spelt commented 8 years ago

Here it is! It should be one unit. All base classes are I think already implemented.

In Delphi classes start with a T so the the class declaration should be:

public TITFReader = class sealed (TOneDReader)

etc etc.

Other things to consider:

Also take a look at the code96reader.pas or the code128reader.pas for a ‘How I did it’ help.

for reference the original source: https://github.com/Redth/ZXing.Net.Mobile/blob/master/Source/ZXing.Net/oned/ITFReader.cs https://github.com/Redth/ZXing.Net.Mobile/blob/master/Source/ZXing.Net/oned/ITFReader.cs

Some words from the original author: Implements decoding of the ITF format, or Interleaved Two of Five. This Reader will scan ITF barcodes of certain lengths only. At the moment it reads length 6, 8, 10, 12, 14, 16, 18, 20, 24, 44 and 48 as these have appeared "in the wild". Not all lengths are scanned, especially shorter ones, to avoid false positives. This in turn is due to a lack of required checksum function. The checksum is optional and is not applied by this Reader. The consumer of the decoded value will have to apply a checksum if required. http://en.wikipedia.org/wiki/Interleaved_2_of_5 http://en.wikipedia.org/wiki/Interleaved_2_of_5 is a great reference for Interleaved 2 of 5 information.

Hope it helps !

Edward

Op 16 dec. 2015, om 10:57 heeft pbhofstede notifications@github.com het volgende geschreven:

Whow, I love your work already! No binaries needed if you want to deploy on android or ios QR-code scanning is working like a charm The ZXing barcode app can scan my ITF-barcode Can we implement this together in ZXingDelphi? If you can decompile it to Delphinet I will try to convert it to Delphi FMX/VCL

— Reply to this email directly or view it on GitHub https://github.com/Spelt/ZXing.Delphi/issues/2.

itf.txt

Spelt commented 8 years ago

looks like the upload of the file failed. I tried it again and it seems to work.

Spelt commented 8 years ago

Did you have any progress?

pbhofstede commented 8 years ago

Hi,

Yeah, the conversion went well and I managed to scan the barcodes. After testing the project was set on halt so wasn't digging further.

If you wish I can send you the code. I havent suppleid it with unit tests.

grtz

Date: Fri, 29 Jan 2016 03:12:01 -0800 From: notifications@github.com To: ZXing.Delphi@noreply.github.com CC: pbhofstede@hotmail.com Subject: Re: [ZXing.Delphi] Implement ITF (#2)

Did you have any progress?

— Reply to this email directly or view it on GitHub.

Spelt commented 8 years ago

Sure! Send it over. I'll add some tests.

Op 29 jan. 2016 om 12:19 heeft pbhofstede notifications@github.com het volgende geschreven:

Hi,

Yeah, the conversion went well and I managed to scan the barcodes. After testing the project was set on halt so wasn't digging further.

If you wish I can send you the code. I havent suppleid it with unit tests.

grtz

Date: Fri, 29 Jan 2016 03:12:01 -0800 From: notifications@github.com To: ZXing.Delphi@noreply.github.com CC: pbhofstede@hotmail.com Subject: Re: [ZXing.Delphi] Implement ITF (#2)

Did you have any progress?

— Reply to this email directly or view it on GitHub.

— Reply to this email directly or view it on GitHub.

pbhofstede commented 8 years ago

You should have got the pas-file in the prev. mail.

Date: Fri, 29 Jan 2016 04:21:16 -0800 From: notifications@github.com To: ZXing.Delphi@noreply.github.com CC: pbhofstede@hotmail.com Subject: Re: [ZXing.Delphi] Implement ITF (#2)

Sure! Send it over. I'll add some tests.

Op 29 jan. 2016 om 12:19 heeft pbhofstede notifications@github.com het volgende geschreven:

Hi,

Yeah, the conversion went well and I managed to scan the barcodes.

After testing the project was set on halt so wasn't digging further.

If you wish I can send you the code. I havent suppleid it with unit tests.

grtz

Date: Fri, 29 Jan 2016 03:12:01 -0800

From: notifications@github.com

To: ZXing.Delphi@noreply.github.com

CC: pbhofstede@hotmail.com

Subject: Re: [ZXing.Delphi] Implement ITF (#2)

Did you have any progress?

Reply to this email directly or view it on GitHub.

Reply to this email directly or view it on GitHub.

— Reply to this email directly or view it on GitHub.

Spelt commented 8 years ago

Unfortunately, I did not receive the pas file.

2016-01-29 13:22 GMT+01:00 pbhofstede notifications@github.com:

You should have got the pas-file in the prev. mail.

Date: Fri, 29 Jan 2016 04:21:16 -0800 From: notifications@github.com To: ZXing.Delphi@noreply.github.com CC: pbhofstede@hotmail.com Subject: Re: [ZXing.Delphi] Implement ITF (#2)

Sure! Send it over. I'll add some tests.

Op 29 jan. 2016 om 12:19 heeft pbhofstede notifications@github.com het volgende geschreven:

Hi,

Yeah, the conversion went well and I managed to scan the barcodes.

After testing the project was set on halt so wasn't digging further.

If you wish I can send you the code. I havent suppleid it with unit tests.

grtz

Date: Fri, 29 Jan 2016 03:12:01 -0800

From: notifications@github.com

To: ZXing.Delphi@noreply.github.com

CC: pbhofstede@hotmail.com

Subject: Re: [ZXing.Delphi] Implement ITF (#2)

Did you have any progress?

Reply to this email directly or view it on GitHub.

Reply to this email directly or view it on GitHub.

— Reply to this email directly or view it on GitHub.

— Reply to this email directly or view it on GitHub https://github.com/Spelt/ZXing.Delphi/issues/2#issuecomment-176728138.

pbhofstede commented 8 years ago

Did you received it now?

Date: Fri, 29 Jan 2016 04:57:42 -0800 From: notifications@github.com To: ZXing.Delphi@noreply.github.com CC: pbhofstede@hotmail.com Subject: Re: [ZXing.Delphi] Implement ITF (#2)

Unfortunately, I did not receive the pas file.

2016-01-29 13:22 GMT+01:00 pbhofstede notifications@github.com:

You should have got the pas-file in the prev. mail.

Date: Fri, 29 Jan 2016 04:21:16 -0800

From: notifications@github.com

To: ZXing.Delphi@noreply.github.com

CC: pbhofstede@hotmail.com

Subject: Re: [ZXing.Delphi] Implement ITF (#2)

Sure! Send it over. I'll add some tests.

Op 29 jan. 2016 om 12:19 heeft pbhofstede notifications@github.com

het volgende geschreven:

Hi,

Yeah, the conversion went well and I managed to scan the barcodes.

After testing the project was set on halt so wasn't digging further.

If you wish I can send you the code. I havent suppleid it with unit

tests.

grtz

Date: Fri, 29 Jan 2016 03:12:01 -0800

From: notifications@github.com

To: ZXing.Delphi@noreply.github.com

CC: pbhofstede@hotmail.com

Subject: Re: [ZXing.Delphi] Implement ITF (#2)

Did you have any progress?

Reply to this email directly or view it on GitHub.

Reply to this email directly or view it on GitHub.

Reply to this email directly or view it on GitHub.

Reply to this email directly or view it on GitHub

https://github.com/Spelt/ZXing.Delphi/issues/2#issuecomment-176728138.

— Reply to this email directly or view it on GitHub.

pbhofstede commented 8 years ago

Even not on: https://github.com/Spelt/ZXing.Delphi/pulls If you can leave a mail address I can send it by mail.

Date: Fri, 29 Jan 2016 05:31:08 -0800 From: notifications@github.com To: ZXing.Delphi@noreply.github.com CC: pbhofstede@hotmail.com Subject: Re: [ZXing.Delphi] Implement ITF (#2)

not seeing any pull requests :-(

— Reply to this email directly or view it on GitHub.

Spelt commented 8 years ago

Hi

I added the ITF + unit tests to the library. I did a minor fix in your code and added some array bounds protection code. This was needed otherwise there was a problem in 'auto mode' with QR codes.

I even discovered a small bug in a base class. It probably had to do with borders. Maybe you deviated from the code in order to compensate for this bug.

Anyway it works! Another barcode added.

Thanks!

2016-01-29 14:46 GMT+01:00 pbhofstede notifications@github.com:

Even not on: https://github.com/Spelt/ZXing.Delphi/pulls If you can leave a mail address I can send it by mail.

Date: Fri, 29 Jan 2016 05:31:08 -0800 From: notifications@github.com To: ZXing.Delphi@noreply.github.com CC: pbhofstede@hotmail.com Subject: Re: [ZXing.Delphi] Implement ITF (#2)

not seeing any pull requests :-(

— Reply to this email directly or view it on GitHub.

— Reply to this email directly or view it on GitHub https://github.com/Spelt/ZXing.Delphi/issues/2#issuecomment-176761269.

pbhofstede commented 8 years ago

Many thanks to you too!

Date: Fri, 29 Jan 2016 09:27:34 -0800 From: notifications@github.com To: ZXing.Delphi@noreply.github.com CC: pbhofstede@hotmail.com Subject: Re: [ZXing.Delphi] Implement ITF (#2)

Hi

I added the ITF + unit tests to the library. I did a minor fix in your code

and added some array bounds protection code. This was needed otherwise

there was a problem in 'auto mode' with QR codes.

I even discovered a small bug in a base class. It probably had to do with

borders. Maybe you deviated from the code in order to compensate for this

bug.

Anyway it works! Another barcode added.

Thanks!

2016-01-29 14:46 GMT+01:00 pbhofstede notifications@github.com:

Even not on: https://github.com/Spelt/ZXing.Delphi/pulls

If you can leave a mail address I can send it by mail.

Date: Fri, 29 Jan 2016 05:31:08 -0800

From: notifications@github.com

To: ZXing.Delphi@noreply.github.com

CC: pbhofstede@hotmail.com

Subject: Re: [ZXing.Delphi] Implement ITF (#2)

not seeing any pull requests :-(

Reply to this email directly or view it on GitHub.

Reply to this email directly or view it on GitHub

https://github.com/Spelt/ZXing.Delphi/issues/2#issuecomment-176761269.

— Reply to this email directly or view it on GitHub.

Spelt commented 8 years ago

Hi There was an ITF update. It crashed due a few bugs :-) on IOS 32bit.

So you need to do an update!

Edward