Skip to content

Commit

Permalink
findFinderPattern()[1] points the outside pixel of the finder pattern
Browse files Browse the repository at this point in the history
  • Loading branch information
opl- committed Nov 23, 2024
1 parent ed8f2ce commit 755a2dc
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
4 changes: 2 additions & 2 deletions src/core/oned/rss/RSS14Reader.ts
Original file line number Diff line number Diff line change
Expand Up @@ -127,7 +127,7 @@ export default class RSS14Reader extends AbstractRSSReader {
const resultPointCallback = hints == null ? null : <ResultPointCallback>hints.get(DecodeHintType.NEED_RESULT_POINT_CALLBACK);

if (resultPointCallback != null) {
let center = (startEnd[0] + startEnd[1]) / 2.0;
let center = (startEnd[0] + startEnd[1] - 1) / 2.0;
if (right) {
// row is actually reversed
center = row.getSize() - 1 - center;
Expand Down Expand Up @@ -160,7 +160,7 @@ export default class RSS14Reader extends AbstractRSSReader {
if (outsideChar) {
OneDReader.recordPatternInReverse(row, pattern.getStartEnd()[0], counters);
} else {
OneDReader.recordPattern(row, pattern.getStartEnd()[1] + 1, counters);
OneDReader.recordPattern(row, pattern.getStartEnd()[1], counters);
// reverse it
for (let i = 0, j = counters.length - 1; i < j; i++ , j--) {
const temp = counters[i];
Expand Down
2 changes: 1 addition & 1 deletion src/test/core/oned/rss/RSS14BlackBox2.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ class RSS14BlackBox2Spec extends AbstractBlackBoxSpec {
public constructor() {
super('src/test/resources/blackbox/rss14-2', new MultiFormatReader(), BarcodeFormat.RSS_14);
this.addTestWithMax(4, 8, 1, 1, 0.0);
this.addTestWithMax(2, 8, 0, 1, 180.0);
this.addTestWithMax(3, 8, 0, 1, 180.0);
}
}

Expand Down

0 comments on commit 755a2dc

Please sign in to comment.