feat: ported qr-model1 support from zxing-cpp

This commit is contained in:
Henry Schimke
2024-01-11 12:53:04 -06:00
parent d2b3bf6c1e
commit eea448ae94
17 changed files with 485 additions and 41 deletions

View File

@@ -67,6 +67,8 @@ pub enum BarcodeFormat {
MICRO_QR_CODE,
RECTANGULAR_MICRO_QR_CODE,
/** RSS 14 */
RSS_14,
@@ -108,6 +110,7 @@ impl Display for BarcodeFormat {
BarcodeFormat::PDF_417 => "pdf 417",
BarcodeFormat::QR_CODE => "qrcode",
BarcodeFormat::MICRO_QR_CODE => "mqr",
BarcodeFormat::RECTANGULAR_MICRO_QR_CODE => "rmqr",
BarcodeFormat::RSS_14 => "rss 14",
BarcodeFormat::RSS_EXPANDED => "rss expanded",
BarcodeFormat::TELEPEN => "telepen",
@@ -150,6 +153,9 @@ impl From<&str> for BarcodeFormat {
"mqr" | "microqr" | "micro_qr" | "micro_qrcode" | "micro_qr_code" | "mqr_code" => {
BarcodeFormat::MICRO_QR_CODE
}
"rmqr" | "rectangular_mqr" | "rectangular_micro_qr" | "rmqr_code" => {
BarcodeFormat::RECTANGULAR_MICRO_QR_CODE
}
"rss 14" | "rss_14" | "rss14" | "gs1 databar" | "gs1 databar coupon"
| "gs1_databar_coupon" => BarcodeFormat::RSS_14,
"rss expanded" | "expanded rss" | "rss_expanded" => BarcodeFormat::RSS_EXPANDED,