New issue report by p...@foreach.be:
Create a QRCode image encoding the string "12328" (just the number, not
the quotes) with EC Level L and data mask 011.
When trying to decode this image, a
ReaderException: versionNumber must be between 1 and 40
will be thrown, because the topleft pattern will be misplaced, causing the
dimension to be estimated at 17, smaller than the minimum 21.
Using ZXing 0.7 on XP
Attachments:
enc17724.png 235 bytes
Issue attributes:
Status: New
Owner: ----
Labels: Type-Defect Priority-Medium
--
You received this message because you are listed in the owner
or CC fields of this issue, or because you starred this issue.
You may adjust your issue notification preferences at:
http://code.google.com/hosting/settings
Comment #1 by srowen:
Sounds like a good bug report, I'll take a look at why it is
misidentified today.
Issue attribute updates:
Status: Accepted
Owner: srowen
Comment #2 by srowen:
Interesting, good bug. It was picking up (43,58) as a finder pattern.
If you look at
the pixels above/below and left/right of it, indeed they match the
finder pattern
profile. Since this is the third finder pattern found, and it can be
confirmed with a
second check on the next row, the detector stops and does not find the
third one.
Here, we know the third "finder pattern" is bogus since it is bigger
than the others
by a noticeable margin. I basically added a heuristic to check this,
and if the
confirmed finder patterns are too different in size, it keeps looking.
Then it finds the real third finder pattern. Later when it has to pick
which 3 of 4
are the real ones, it does get it right.
The fix makes this image work. Of course, if we misidentified a finder
pattern that
matched real ones in size, we would still have a decode problem. This
is a weakness
in the current FinderPatternFinder -- it's trying to be fast but will
miss tricky
corner cases like this.
At least, it is less easily fooled now. This image now decodes.
The fix is checked into Subversion. The change is just to
FinderPatternFinder, so you
could just pick up that change, recompile.
Issue attribute updates:
Status: Fixed