UPC/EAN Extension 2/5 does not read the 2/5 digit extension
Nobody has claimed this yet.
Assessment
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Newbie friendliness
- 25/100
- Issue type
- Bug
- Clarity
- Mostly clear
- Activity status
- Stale
- Tech stack
- csharp
- Domain
- computer-vision
Research direction
Start by reproducing the problem: decode the attached comic barcode image with a BarcodeReader whose Options.PossibleFormats contains only UPC_EAN_EXTENSION, and compare the result with DecodeMultiple. The payload names no source files, so locate the UPC/EAN extension decoder yourself. Done means the 2-digit or 5-digit extension is returned, or the report is shown to be a usage error.
Written by the indexing model from the issue text.
Description
I'm attempting to scan comic book/magazine bar codes. They look like this:
My code looks like this:
string barcode = string.Empty;
using (var stream = file.OpenReadStream())
{
try
{
stream.Seek(0, SeekOrigin.Begin);
using var coreCompatImage = (Bitmap)Bitmap.FromStream(stream);
var coreCompatReader = new ZXing.Windows.Compatibility.BarcodeReader();
coreCompatReader.Options.PossibleFormats = new List<BarcodeFormat> { BarcodeFormat.UPC_A,
BarcodeFormat.UPC_EAN_EXTENSION, BarcodeFormat.ITF };
var coreCompatResult = coreCompatReader.Decode(coreCompatImage);
var test = coreCompatReader.DecodeMultiple(coreCompatImage);
barcode = coreCompatResult?.Text ?? string.Empty;
}
catch (Exception exc)
{
return "Error processing the image: ";
}
}
return barcode;
Test is an array with 1 item, even if UPC_EAN_EXTENSION is the only possible format provided. The one item is the 12 digits from the UPC_A format. I have used this image with a barcode scanner that is aware of the 5 digit extension, and get the correct code back, which leads me to suspect it's a problem with my implementation or the library.
I appreciate the help
- Dominant language
- C#
- Stars
- 3.1k
- Forks
- 704
- Avg merge
- 13d 17h
- Merged PRs (30d)
- 2
Getting set up
This project ships no dev container, Dockerfile or contributing guide, so setting up is up to you: start from its README, and see our first-contribution guide for the general steps.
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
More from micjahn/ZXing.Net
-
crop() overrides document "0 <= top <= Height"; should be top < Height like left < WidthPossibly taken A pull request linked to this issue is open or already merged. Open
Difficulty 1/5 Under an hour Newbie friendliness 92/100
-
Difficulty 2/5 1-3 hours Newbie friendliness 62/100
-
Difficulty 3/5 Half a day Newbie friendliness 22/100
-
Difficulty 3/5 1-2 days Newbie friendliness 42/100
-
Difficulty 4/5 3-5 days Newbie friendliness 12/100
All issues in micjahn/ZXing.Net
Similar issues
-
Difficulty 2/5 1-3 hours Newbie friendliness 78/100
-
area: core priority: low type: bug
Difficulty 2/5 1-3 hours Newbie friendliness 74/100
RicoSuter/Namotion.Interceptor#863 ·
Maintainers usually reply within 1 day
-
Difficulty 2/5 1-3 hours Newbie friendliness 76/100
bitfoundation/bitplatform#14428 · 1 comment ·
Maintainers usually reply within 1 day
-
area-cli
Difficulty 2/5 1-3 hours Newbie friendliness 72/100
Maintainers usually reply within 1 day
-
0.3.0
Difficulty 2/5 1-3 hours Newbie friendliness 78/100
Maintainers usually reply within 1 day