Merge pull request #1386 from obfusk/data-matrix-not-square

CatimaBarcode: DATA_MATRIX is not always square
This commit is contained in:
Sylvia van Os
2023-06-23 23:16:02 +02:00
committed by GitHub
2 changed files with 4 additions and 2 deletions

View File

@@ -103,12 +103,15 @@ public class BarcodeImageWriterTask implements CompatCallable<Bitmap> {
switch (format.format()) {
// 2D barcodes
case AZTEC:
case DATA_MATRIX:
case MAXICODE:
case PDF_417:
case QR_CODE:
return MAX_WIDTH_2D;
// 2D but rectangular versions get blurry otherwise
case DATA_MATRIX:
return MAX_WIDTH_1D;
// 1D barcodes:
case CODABAR:
case CODE_39:

View File

@@ -67,7 +67,6 @@ public class CatimaBarcode {
public boolean isSquare() {
return mBarcodeFormat == BarcodeFormat.AZTEC
|| mBarcodeFormat == BarcodeFormat.DATA_MATRIX
|| mBarcodeFormat == BarcodeFormat.MAXICODE
|| mBarcodeFormat == BarcodeFormat.QR_CODE;
}