mirror of
https://github.com/zxing/zxing.git
synced 2025-01-12 11:47:26 -08:00
findFinderPattern()[1] points the outside pixel of the finder pattern (#1179)
This commit is contained in:
parent
6075d5b2f6
commit
ae6d7e55af
|
@ -164,7 +164,8 @@ public final class RSS14Reader extends AbstractRSSReader {
|
|||
(ResultPointCallback) hints.get(DecodeHintType.NEED_RESULT_POINT_CALLBACK);
|
||||
|
||||
if (resultPointCallback != null) {
|
||||
float center = (startEnd[0] + startEnd[1]) / 2.0f;
|
||||
startEnd = pattern.getStartEnd();
|
||||
float center = (startEnd[0] + startEnd[1] - 1) / 2.0f;
|
||||
if (right) {
|
||||
// row is actually reversed
|
||||
center = row.getSize() - 1 - center;
|
||||
|
@ -193,7 +194,7 @@ public final class RSS14Reader extends AbstractRSSReader {
|
|||
if (outsideChar) {
|
||||
recordPatternInReverse(row, pattern.getStartEnd()[0], counters);
|
||||
} else {
|
||||
recordPattern(row, pattern.getStartEnd()[1] + 1, counters);
|
||||
recordPattern(row, pattern.getStartEnd()[1], counters);
|
||||
// reverse it
|
||||
for (int i = 0, j = counters.length - 1; i < j; i++, j--) {
|
||||
int temp = counters[i];
|
||||
|
|
|
@ -28,7 +28,7 @@ public final class RSS14BlackBox2TestCase extends AbstractBlackBoxTestCase {
|
|||
public RSS14BlackBox2TestCase() {
|
||||
super("src/test/resources/blackbox/rss14-2", new MultiFormatReader(), BarcodeFormat.RSS_14);
|
||||
addTest(4, 8, 1, 1, 0.0f);
|
||||
addTest(2, 8, 0, 1, 180.0f);
|
||||
addTest(3, 8, 0, 1, 180.0f);
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue