- // First, skip white border by tracking diagonally from the top left down and to the right:
- int borderWidth = 0;
- while (borderWidth < minDimension && !image.get(borderWidth, borderWidth)) {
- borderWidth++;
- }
- if (borderWidth == minDimension) {
+ // And then keep tracking across the top-left black module to determine module size
+ //int moduleEnd = borderWidth;
+ int[] leftTopBlack = image.getTopLeftOnBit();
+ if (leftTopBlack == null) {