From 4e13b0e95d4373251bcae3d0c6e43bd5e24ad5d9 Mon Sep 17 00:00:00 2001 From: Robin Stuart Date: Wed, 24 Aug 2016 19:37:49 +0100 Subject: [PATCH 1/7] Add framework for Codablock --- backend/CMakeLists.txt | 2 +- backend/library.c | 19 +++++++---- backend/zint.h | 2 +- frontend/main.c | 63 +++++++++++++++++++------------------ frontend_qt4/mainwindow.cpp | 5 +-- frontend_qt4/mainwindow.h | 1 + 6 files changed, 51 insertions(+), 41 deletions(-) diff --git a/backend/CMakeLists.txt b/backend/CMakeLists.txt index 63a9a4a5..ba149d15 100644 --- a/backend/CMakeLists.txt +++ b/backend/CMakeLists.txt @@ -7,7 +7,7 @@ find_package(PNG) set(zint_COMMON_SRCS common.c library.c render.c large.c reedsol.c gs1.c eci.c) set(zint_ONEDIM_SRCS code.c code128.c 2of5.c upcean.c telepen.c medical.c plessey.c rss.c) set(zint_POSTAL_SRCS postal.c auspost.c imail.c) -set(zint_TWODIM_SRCS code16k.c dmatrix.c pdf417.c qr.c maxicode.c composite.c aztec.c code49.c code1.c gridmtx.c hanxin.c dotcode.c) +set(zint_TWODIM_SRCS code16k.c codablock.c dmatrix.c pdf417.c qr.c maxicode.c composite.c aztec.c code49.c code1.c gridmtx.c hanxin.c dotcode.c) set(zint_OUTPUT_SRCS render.c ps.c svg.c bmp.c pcx.c gif.c png.c raster.c) set(zint_SRCS ${zint_OUTPUT_SRCS} ${zint_COMMON_SRCS} ${zint_ONEDIM_SRCS} ${zint_POSTAL_SRCS} ${zint_TWODIM_SRCS}) diff --git a/backend/library.c b/backend/library.c index 4a1397e9..ec044180 100644 --- a/backend/library.c +++ b/backend/library.c @@ -187,6 +187,7 @@ extern int code_one(struct zint_symbol *symbol, unsigned char source[], int leng extern int grid_matrix(struct zint_symbol *symbol, const unsigned char source[], int length); /* Grid Matrix */ extern int han_xin(struct zint_symbol * symbol, const unsigned char source[], int length); /* Han Xin */ extern int dotcode(struct zint_symbol * symbol, const unsigned char source[], int length); /* DotCode */ +extern int codablock(struct zint_symbol * symbol, const unsigned char source[], int length); /* Codablock */ extern int plot_raster(struct zint_symbol *symbol, int rotate_angle, int file_type); /* Plot to PNG/BMP/PCX */ extern int render_plot(struct zint_symbol *symbol, float width, float height); /* Plot to gLabels */ @@ -349,6 +350,9 @@ int hibc(struct zint_symbol *symbol, unsigned char source[], int length) { case BARCODE_HIBC_AZTEC: error_number = aztec(symbol, (unsigned char *) to_process, length); break; + case BARCODE_HIBC_BLOCKF: + error_number = codablock(symbol, (unsigned char *) to_process, length); + break; } return error_number; @@ -380,6 +384,7 @@ static int gs1_compliant(const int symbology) { case BARCODE_CODE49: case BARCODE_QRCODE: case BARCODE_DOTCODE: + case BARCODE_CODABLOCK: result = 1; break; } @@ -508,6 +513,7 @@ int ZBarcode_ValidID(int symbol_id) { case BARCODE_HIBC_PDF: case BARCODE_HIBC_MICPDF: case BARCODE_HIBC_AZTEC: + case BARCODE_HIBC_BLOCKF: case BARCODE_AZRUNE: case BARCODE_CODE32: case BARCODE_EANX_CC: @@ -525,6 +531,7 @@ int ZBarcode_ValidID(int symbol_id) { case BARCODE_GRIDMATRIX: case BARCODE_HANXIN: case BARCODE_DOTCODE: + case BARCODE_CODABLOCK: result = 1; break; } @@ -726,6 +733,8 @@ static int reduced_charset(struct zint_symbol *symbol, const unsigned char *sour break; case BARCODE_HIBC_AZTEC: error_number = hibc(symbol, preprocessed, length); break; + case BARCODE_HIBC_BLOCKF: error_number = hibc(symbol, preprocessed, length); + break; case BARCODE_JAPANPOST: error_number = japan_post(symbol, preprocessed, length); break; case BARCODE_CODE49: error_number = code_49(symbol, preprocessed, length); @@ -748,6 +757,8 @@ static int reduced_charset(struct zint_symbol *symbol, const unsigned char *sour break; case BARCODE_DOTCODE: error_number = dotcode(symbol, preprocessed, length); break; + case BARCODE_CODABLOCK: error_number = codablock(symbol, preprocessed, length); + break; } return error_number; @@ -843,8 +854,8 @@ int ZBarcode_Encode(struct zint_symbol *symbol, unsigned char *source, int lengt symbol->symbology = BARCODE_AUSPOST; } if (symbol->symbology == 73) { - strcpy(symbol->errtxt, "Codablock E not supported"); - error_number = ZINT_ERROR_INVALID_OPTION; + symbol->symbology = BARCODE_CODABLOCK; + symbol->input_mode = GS1_MODE; } if (symbol->symbology == 78) { symbol->symbology = BARCODE_RSS14; @@ -905,10 +916,6 @@ int ZBarcode_Encode(struct zint_symbol *symbol, unsigned char *source, int lengt symbol->symbology = BARCODE_CODE128; error_number = ZINT_WARN_INVALID_OPTION; } - if ((symbol->symbology == BARCODE_CODABLOCKF) || (symbol->symbology == BARCODE_HIBC_BLOCKF)) { - strcpy(symbol->errtxt, "Codablock F not supported"); - error_number = ZINT_ERROR_INVALID_OPTION; - } if (error_number > 4) { error_tag(symbol->errtxt, error_number); diff --git a/backend/zint.h b/backend/zint.h index 7cb73081..798e06f4 100644 --- a/backend/zint.h +++ b/backend/zint.h @@ -143,7 +143,7 @@ extern "C" { #define BARCODE_RM4SCC 70 #define BARCODE_DATAMATRIX 71 #define BARCODE_EAN14 72 -#define BARCODE_CODABLOCKF 74 +#define BARCODE_CODABLOCK 74 #define BARCODE_NVE18 75 #define BARCODE_JAPANPOST 76 #define BARCODE_KOREAPOST 77 diff --git a/frontend/main.c b/frontend/main.c index 4df65650..d4c031b3 100644 --- a/frontend/main.c +++ b/frontend/main.c @@ -37,34 +37,35 @@ /* Print list of supported symbologies */ void types(void) { - printf( " 1: Code 11 51: Pharma One-Track 90: KIX Code\n" - " 2: Standard 2of5 52: PZN 92: Aztec Code\n" - " 3: Interleaved 2of5 53: Pharma Two-Track 93: DAFT Code\n" - " 4: IATA 2of5 55: PDF417 97: Micro QR Code\n" - " 6: Data Logic 56: PDF417 Trunc 98: HIBC Code 128\n" - " 7: Industrial 2of5 57: Maxicode 99: HIBC Code 39\n" - " 8: Code 39 58: QR Code 102: HIBC Data Matrix\n" - " 9: Extended Code 39 60: Code 128-B 104: HIBC QR Code\n" - "13: EAN 63: AP Standard Customer 106: HIBC PDF417\n" - "16: GS1-128 66: AP Reply Paid 108: HIBC MicroPDF417\n" - "18: Codabar 67: AP Routing 112: HIBC Aztec Code\n" - "20: Code 128 68: AP Redirection 115: DotCode\n" - "21: Leitcode 69: ISBN 116: Han Xin Code\n" - "22: Identcode 70: RM4SCC 128: Aztec Runes\n" - "23: Code 16k 71: Data Matrix 129: Code 32\n" - "24: Code 49 72: EAN-14 130: Comp EAN\n" - "25: Code 93 75: NVE-18 131: Comp GS1-128\n" - "28: Flattermarken 76: Japanese Post 132: Comp DataBar Omni\n" - "29: GS1 DataBar Omni 77: Korea Post 133: Comp DataBar Ltd\n" - "30: GS1 DataBar Ltd 79: GS1 DataBar Stack 134: Comp DataBar ExpOm\n" - "31: GS1 DataBar ExpOm 80: GS1 DataBar Stack Omni 135: Comp UPC-A\n" - "32: Telepen Alpha 81: GS1 DataBar ESO 136: Comp UPC-E\n" - "34: UPC-A 82: Planet 137: Comp DataBar Stack\n" - "37: UPC-E 84: MicroPDF 138: Comp DataBar Stack Omni\n" - "40: Postnet 85: USPS OneCode 139: Comp DataBar ESO\n" - "47: MSI Plessey 86: UK Plessey 140: Channel Code\n" - "49: FIM 87: Telepen Numeric 141: Code One\n" - "50: Logmars 89: ITF-14 142: Grid Matrix\n" + printf( " 1: Code 11 52: PZN 92: Aztec Code\n" + " 2: Standard 2of5 53: Pharma Two-Track 93: DAFT Code\n" + " 3: Interleaved 2of5 55: PDF417 97: Micro QR Code\n" + " 4: IATA 2of5 56: PDF417 Trunc 98: HIBC Code 128\n" + " 6: Data Logic 57: Maxicode 99: HIBC Code 39\n" + " 7: Industrial 2of5 58: QR Code 102: HIBC Data Matrix\n" + " 8: Code 39 60: Code 128-B 104: HIBC QR Code\n" + " 9: Extended Code 39 63: AP Standard Customer 106: HIBC PDF417\n" + "13: EAN 66: AP Reply Paid 108: HIBC MicroPDF417\n" + "16: GS1-128 67: AP Routing 112: HIBC Aztec Code\n" + "18: Codabar 68: AP Redirection 115: DotCode\n" + "20: Code 128 69: ISBN 116: Han Xin Code\n" + "21: Leitcode 70: RM4SCC 128: Aztec Runes\n" + "22: Identcode 71: Data Matrix 129: Code 32\n" + "23: Code 16k 72: EAN-14 130: Comp EAN\n" + "24: Code 49 74: Codablock 131: Comp GS1-128\n" + "25: Code 93 75: NVE-18 132: Comp DataBar Omni\n" + "28: Flattermarken 76: Japanese Post 133: Comp DataBar Ltd\n" + "29: GS1 DataBar Omni 77: Korea Post 134: Comp DataBar ExpOm\n" + "30: GS1 DataBar Ltd 79: GS1 DataBar Stack 135: Comp UPC-A\n" + "31: GS1 DataBar ExpOm 80: GS1 DataBar Stack Omni 136: Comp UPC-E\n" + "32: Telepen Alpha 81: GS1 DataBar ESO 137: Comp DataBar Stack\n" + "34: UPC-A 82: Planet 138: Comp DataBar Stack Omni\n" + "37: UPC-E 84: MicroPDF 139: Comp DataBar ESO\n" + "40: Postnet 85: USPS OneCode 140: Channel Code\n" + "47: MSI Plessey 86: UK Plessey 141: Code One\n" + "49: FIM 87: Telepen Numeric 142: Grid Matrix\n" + "50: Logmars 89: ITF-14\n" + "51: Pharma One-Track 90: KIX Code\n" ); } @@ -95,7 +96,7 @@ void usage(void) { " --dump Dump hexadecimal representation to stdout\n" " --rotate=NUMBER Rotate symbol (PNG output only).\n" " --cols=NUMBER (PDF417) Number of columns.\n" - " --vers=NUMBER (QR Code) Version\n" + " --vers=NUMBER (QR Code or Han Xin) Version\n" " --secure=NUMBER (PDF417 and QR Code) Error correction level.\n" " --primary=STRING (Maxicode and Composite) Structured primary message.\n" " --mode=NUMBER (Maxicode and Composite) Set encoding mode.\n" @@ -624,10 +625,10 @@ int main(int argc, char **argv) { } } if (!strcmp(long_options[option_index].name, "vers")) { - if ((atoi(optarg) >= 1) && (atoi(optarg) <= 47)) { + if ((atoi(optarg) >= 1) && (atoi(optarg) <= 84)) { my_symbol->option_2 = atoi(optarg); } else { - fprintf(stderr, "Invalid QR Code version\n"); + fprintf(stderr, "Invalid Version\n"); fflush(stderr); } } diff --git a/frontend_qt4/mainwindow.cpp b/frontend_qt4/mainwindow.cpp index 6ea3c158..85a51af1 100644 --- a/frontend_qt4/mainwindow.cpp +++ b/frontend_qt4/mainwindow.cpp @@ -39,6 +39,7 @@ MainWindow::MainWindow(QWidget* parent, Qt::WFlags fl) "Aztec Runes", "Channel Code", "Codabar", + "Codablock", "Code 11", "Code 128 (ISO 15417)", "Code 16k", @@ -70,7 +71,7 @@ MainWindow::MainWindow(QWidget* parent, Qt::WFlags fl) "GS1 DataBar Stacked", "GS1 DataBar Stacked Omnidirectional", "Han Xin (Chinese Sensible) Code", - "ITF-14", + "ITF-14", "International Standard Book Number (ISBN)", "Japanese Postal Barcode", "Korean Postal Barcode", @@ -108,7 +109,7 @@ MainWindow::MainWindow(QWidget* parent, Qt::WFlags fl) bstyle->addItem(metaObject()->enumerator(0).key(i)); bstyle->setItemText(i,bstyle_text[i]); } - bstyle->setCurrentIndex(9); + bstyle->setCurrentIndex(10); change_options(); update_preview(); view->scene()->addItem(&m_bc); diff --git a/frontend_qt4/mainwindow.h b/frontend_qt4/mainwindow.h index 9f00bd02..2374980c 100644 --- a/frontend_qt4/mainwindow.h +++ b/frontend_qt4/mainwindow.h @@ -46,6 +46,7 @@ public: AZRUNE =128, CHANNEL =140, CODABAR =18, + CODABLOCK =74, CODE11 =1, CODE128 =20, CODE16K =23, From 085ec8477c5e12b2475161d6dd7c9e32a2327dd6 Mon Sep 17 00:00:00 2001 From: Robin Stuart Date: Wed, 24 Aug 2016 19:39:39 +0100 Subject: [PATCH 2/7] Add framework for Codablock --- backend/codablock.c | 45 +++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 45 insertions(+) create mode 100644 backend/codablock.c diff --git a/backend/codablock.c b/backend/codablock.c new file mode 100644 index 00000000..8b9fd77f --- /dev/null +++ b/backend/codablock.c @@ -0,0 +1,45 @@ +/* codablock.c - Handles Codablock-F and Codablock-E */ + +/* + libzint - the open source barcode library + Copyright (C) 2016 Harald Oehlmann + + Redistribution and use in source and binary forms, with or without + modification, are permitted provided that the following conditions + are met: + + 1. Redistributions of source code must retain the above copyright + notice, this list of conditions and the following disclaimer. + 2. Redistributions in binary form must reproduce the above copyright + notice, this list of conditions and the following disclaimer in the + documentation and/or other materials provided with the distribution. + 3. Neither the name of the project nor the names of its contributors + may be used to endorse or promote products derived from this software + without specific prior written permission. + + THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND + ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE + IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE + ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE + FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL + DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS + OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) + HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT + LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY + OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF + SUCH DAMAGE. + */ + +#include +#include "common.h" + +int codablock(struct zint_symbol *symbol, unsigned char source[], int length) { + + if (symbol->input_mode == GS1_MODE) { + printf("Encode GS1 data (Codablock-E?)\n"); + } else { + printf("Encode in Codablock-F\n"); + } + + return ZINT_ERROR_INVALID_OPTION; +} \ No newline at end of file From 542ec7c7a5e756e8a3463fd41ee18db37c6b4e4f Mon Sep 17 00:00:00 2001 From: Robin Stuart Date: Fri, 26 Aug 2016 11:44:02 +0100 Subject: [PATCH 3/7] When libpng is not found, default to GIF output --- backend/CMakeLists.txt | 4 +++- backend/library.c | 9 +++++++++ backend/raster.c | 1 - 3 files changed, 12 insertions(+), 2 deletions(-) diff --git a/backend/CMakeLists.txt b/backend/CMakeLists.txt index ba149d15..3dd8d073 100644 --- a/backend/CMakeLists.txt +++ b/backend/CMakeLists.txt @@ -22,7 +22,9 @@ add_library(zint SHARED ${zint_SRCS}) set_target_properties(zint PROPERTIES SOVERSION "${ZINT_VERSION_MAJOR}.${ZINT_VERSION_MINOR}" VERSION ${ZINT_VERSION}) -target_link_libraries(zint ${PNG_LIBRARIES} ) +if(PNG_FOUND) + target_link_libraries(zint ${PNG_LIBRARIES} ) +endif(PNG_FOUND) target_link_libraries(zint -lm) install(TARGETS zint ${INSTALL_TARGETS_DEFAULT_ARGS} ) diff --git a/backend/library.c b/backend/library.c index ec044180..62d594e0 100644 --- a/backend/library.c +++ b/backend/library.c @@ -781,7 +781,11 @@ int ZBarcode_Encode(struct zint_symbol *symbol, unsigned char *source, int lengt } if (strcmp(symbol->outfile, "") == 0) { +#ifdef NO_PNG + strcpy(symbol->outfile, "out.gif"); +#else strcpy(symbol->outfile, "out.png"); +#endif } #ifndef _MSC_VER unsigned char local_source[length + 1]; @@ -1085,6 +1089,11 @@ int ZBarcode_Print(struct zint_symbol *symbol, int rotate_angle) { return ZINT_ERROR_INVALID_OPTION; } + if (error_number == ZINT_ERROR_INVALID_OPTION) { + /* If libpng is not installed */ + strcpy(symbol->errtxt, "Unknown output format"); + } + error_tag(symbol->errtxt, error_number); return error_number; } diff --git a/backend/raster.c b/backend/raster.c index 51f7b829..d13c1c5a 100644 --- a/backend/raster.c +++ b/backend/raster.c @@ -927,7 +927,6 @@ int plot_raster(struct zint_symbol *symbol, int rotate_angle, int file_type) { #ifdef NO_PNG if (file_type == OUT_PNG_FILE) { - printf("libpng not found"); return ZINT_ERROR_INVALID_OPTION; } #endif /* NO_PNG */ From c6a68dd605bbfbe37512f1cb96132ee56b8917e2 Mon Sep 17 00:00:00 2001 From: Robin Stuart Date: Fri, 26 Aug 2016 12:15:54 +0100 Subject: [PATCH 4/7] bugfix: Corruption of output_options data --- backend/code49.c | 2 +- backend/library.c | 8 ++++---- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/backend/code49.c b/backend/code49.c index 9b83ed4e..64fe280c 100644 --- a/backend/code49.c +++ b/backend/code49.c @@ -329,7 +329,7 @@ int code_49(struct zint_symbol *symbol, unsigned char source[], const int length } symbol->whitespace_width = 10; - symbol->output_options = BARCODE_BIND; + symbol->output_options += BARCODE_BIND; symbol->border_width = 2; return 0; diff --git a/backend/library.c b/backend/library.c index 62d594e0..d912dd50 100644 --- a/backend/library.c +++ b/backend/library.c @@ -218,7 +218,7 @@ int dump_plot(struct zint_symbol *symbol) { char hex[] = {'0', '1', '2', '3', '4', '5', '6', '7', '8', '9', 'A', 'B', 'C', 'D', 'E', 'F'}; int space = 0; - + if (symbol->output_options & BARCODE_STDOUT) { f = stdout; } else { @@ -570,13 +570,13 @@ static int reduced_charset(struct zint_symbol *symbol, const unsigned char *sour if (symbol->symbology == BARCODE_CODE16K) { symbol->whitespace_width = 16; symbol->border_width = 2; - symbol->output_options = BARCODE_BIND; + symbol->output_options += BARCODE_BIND; } if (symbol->symbology == BARCODE_ITF14) { symbol->whitespace_width = 20; symbol->border_width = 8; - symbol->output_options = BARCODE_BOX; + symbol->output_options += BARCODE_BOX; } switch (symbol->input_mode) { @@ -1032,7 +1032,7 @@ int ZBarcode_Print(struct zint_symbol *symbol, int rotate_angle) { return ZINT_ERROR_INVALID_OPTION; } - if (symbol->output_options &= BARCODE_DOTTY_MODE) { + if (symbol->output_options & BARCODE_DOTTY_MODE) { if (!(is_matrix(symbol->symbology))) { strcpy(symbol->errtxt, "Selected symbology cannot be rendered as dots"); return ZINT_ERROR_INVALID_OPTION; From c11afb644ec4ecf18fbb65499dc4751ac8455ffe Mon Sep 17 00:00:00 2001 From: Robin Stuart Date: Fri, 26 Aug 2016 12:34:14 +0100 Subject: [PATCH 5/7] Add HIBC Codablock option to frontend --- frontend/main.c | 38 +++++++++++++++++++------------------- 1 file changed, 19 insertions(+), 19 deletions(-) diff --git a/frontend/main.c b/frontend/main.c index d4c031b3..3a06a156 100644 --- a/frontend/main.c +++ b/frontend/main.c @@ -46,25 +46,25 @@ void types(void) { " 8: Code 39 60: Code 128-B 104: HIBC QR Code\n" " 9: Extended Code 39 63: AP Standard Customer 106: HIBC PDF417\n" "13: EAN 66: AP Reply Paid 108: HIBC MicroPDF417\n" - "16: GS1-128 67: AP Routing 112: HIBC Aztec Code\n" - "18: Codabar 68: AP Redirection 115: DotCode\n" - "20: Code 128 69: ISBN 116: Han Xin Code\n" - "21: Leitcode 70: RM4SCC 128: Aztec Runes\n" - "22: Identcode 71: Data Matrix 129: Code 32\n" - "23: Code 16k 72: EAN-14 130: Comp EAN\n" - "24: Code 49 74: Codablock 131: Comp GS1-128\n" - "25: Code 93 75: NVE-18 132: Comp DataBar Omni\n" - "28: Flattermarken 76: Japanese Post 133: Comp DataBar Ltd\n" - "29: GS1 DataBar Omni 77: Korea Post 134: Comp DataBar ExpOm\n" - "30: GS1 DataBar Ltd 79: GS1 DataBar Stack 135: Comp UPC-A\n" - "31: GS1 DataBar ExpOm 80: GS1 DataBar Stack Omni 136: Comp UPC-E\n" - "32: Telepen Alpha 81: GS1 DataBar ESO 137: Comp DataBar Stack\n" - "34: UPC-A 82: Planet 138: Comp DataBar Stack Omni\n" - "37: UPC-E 84: MicroPDF 139: Comp DataBar ESO\n" - "40: Postnet 85: USPS OneCode 140: Channel Code\n" - "47: MSI Plessey 86: UK Plessey 141: Code One\n" - "49: FIM 87: Telepen Numeric 142: Grid Matrix\n" - "50: Logmars 89: ITF-14\n" + "16: GS1-128 67: AP Routing 110: HIBC Codablock-F\n" + "18: Codabar 68: AP Redirection 112: HIBC Aztec Code\n" + "20: Code 128 69: ISBN 115: DotCode\n" + "21: Leitcode 70: RM4SCC 116: Han Xin Code\n" + "22: Identcode 71: Data Matrix 128: Aztec Runes\n" + "23: Code 16k 72: EAN-14 129: Code 32\n" + "24: Code 49 74: Codablock 130: Comp EAN\n" + "25: Code 93 75: NVE-18 131: Comp GS1-128\n" + "28: Flattermarken 76: Japanese Post 132: Comp DataBar Omni\n" + "29: GS1 DataBar Omni 77: Korea Post 133: Comp DataBar Ltd\n" + "30: GS1 DataBar Ltd 79: GS1 DataBar Stack 134: Comp DataBar ExpOm\n" + "31: GS1 DataBar ExpOm 80: GS1 DataBar Stack Omni 135: Comp UPC-A\n" + "32: Telepen Alpha 81: GS1 DataBar ESO 136: Comp UPC-E\n" + "34: UPC-A 82: Planet 137: Comp DataBar Stack\n" + "37: UPC-E 84: MicroPDF 138: Comp DataBar Stack Omni\n" + "40: Postnet 85: USPS OneCode 139: Comp DataBar ESO\n" + "47: MSI Plessey 86: UK Plessey 140: Channel Code\n" + "49: FIM 87: Telepen Numeric 141: Code One\n" + "50: Logmars 89: ITF-14 142: Grid Matrix\n" "51: Pharma One-Track 90: KIX Code\n" ); } From 747faf85ed4fab18914771f89eda942494099c6d Mon Sep 17 00:00:00 2001 From: Robin Stuart Date: Fri, 26 Aug 2016 14:03:02 +0100 Subject: [PATCH 6/7] Update test script --- frontend/test.sh | 656 ++++++++++++++++++++++++----------------------- 1 file changed, 337 insertions(+), 319 deletions(-) diff --git a/frontend/test.sh b/frontend/test.sh index 1deb2a1b..e140fb09 100755 --- a/frontend/test.sh +++ b/frontend/test.sh @@ -1,419 +1,437 @@ echo testing Code 11 -zint -o bar01.png -b 1 --height=50 --border=10 -d 87654321 -zint -o bar01.eps -b 1 --height=50 --border=10 -d 87654321 -zint -o bar01.svg -b 1 --height=50 --border=10 -d 87654321 +./zint -o bar01.txt -b 1 -d 87654321 +./zint -o bar01.gif -b 1 --height=50 --border=10 -d 87654321 +./zint -o bar01.svg -b 1 --height=50 --border=10 -d 87654321 echo testing Code 2 of 5 Standard -zint -o bar02.png -b 2 --height=50 --border=10 -d 87654321 -zint -o bar02.eps -b 2 --height=50 --border=10 -d 87654321 -zint -o bar02.svg -b 2 --height=50 --border=10 -d 87654321 +./zint -o bar02.txt -b 2 -d 87654321 +./zint -o bar02.gif -b 2 --height=50 --border=10 -d 87654321 +./zint -o bar02.svg -b 2 --height=50 --border=10 -d 87654321 echo testing Interleaved 2 of 5 -zint -o bar03.png -b 3 --height=50 --border=10 -d 87654321 -zint -o bar03.eps -b 3 --height=50 --border=10 -d 87654321 -zint -o bar03.svg -b 3 --height=50 --border=10 -d 87654321 +./zint -o bar03.txt -b 3 -d 87654321 +./zint -o bar03.gif -b 3 --height=50 --border=10 -d 87654321 +./zint -o bar03.svg -b 3 --height=50 --border=10 -d 87654321 echo testing Code 2 of 5 IATA -zint -o bar04.png -b 4 --height=50 --border=10 -d 87654321 -zint -o bar04.eps -b 4 --height=50 --border=10 -d 87654321 -zint -o bar04.svg -b 4 --height=50 --border=10 -d 87654321 +./zint -o bar04.txt -b 4 -d 87654321 +./zint -o bar04.gif -b 4 --height=50 --border=10 -d 87654321 +./zint -o bar04.svg -b 4 --height=50 --border=10 -d 87654321 echo testing Code 2 of 5 Data Logic -zint -o bar06.png -b 6 --height=50 --border=10 -d 87654321 -zint -o bar06.eps -b 6 --height=50 --border=10 -d 87654321 -zint -o bar06.svg -b 6 --height=50 --border=10 -d 87654321 +./zint -o bar06.txt -b 6 -d 87654321 +./zint -o bar06.gif -b 6 --height=50 --border=10 -d 87654321 +./zint -o bar06.svg -b 6 --height=50 --border=10 -d 87654321 echo testing Code 2 of 5 Industrial -zint -o bar07.png -b 7 --height=50 --border=10 -d 87654321 -zint -o bar07.eps -b 7 --height=50 --border=10 -d 87654321 -zint -o bar07.svg -b 7 --height=50 --border=10 -d 87654321 +./zint -o bar07.txt -b 7 -d 87654321 +./zint -o bar07.gif -b 7 --height=50 --border=10 -d 87654321 +./zint -o bar07.svg -b 7 --height=50 --border=10 -d 87654321 echo testing Code 39 -zint -o bar08.png -b 8 --height=50 --border=10 -d CODE39 -zint -o bar08.eps -b 8 --height=50 --border=10 -d CODE39 -zint -o bar08.svg -b 8 --height=50 --border=10 -d CODE39 +./zint -o bar08.txt -b 8 -d CODE39 +./zint -o bar08.gif -b 8 --height=50 --border=10 -d CODE39 +./zint -o bar08.svg -b 8 --height=50 --border=10 -d CODE39 echo testing Extended Code 39 -zint -o bar09.png -b 9 --height=50 --border=10 -d 'Code 39e' -zint -o bar09.eps -b 9 --height=50 --border=10 -d 'Code 39e' -zint -o bar09.svg -b 9 --height=50 --border=10 -d 'Code 39e' +./zint -o bar09.txt -b 9 -d 'Code 39e' +./zint -o bar09.gif -b 9 --height=50 --border=10 -d 'Code 39e' +./zint -o bar09.svg -b 9 --height=50 --border=10 -d 'Code 39e' echo testing EAN8 -zint -o bar10.png -b 13 --height=50 --border=10 -d 7654321 -zint -o bar10.eps -b 13 --height=50 --border=10 -d 7654321 -zint -o bar10.svg -b 13 --height=50 --border=10 -d 7654321 +./zint -o bar10.txt -b 13 -d 7654321 +./zint -o bar10.gif -b 13 --height=50 --border=10 -d 7654321 +./zint -o bar10.svg -b 13 --height=50 --border=10 -d 7654321 echo testing EAN8 - 2 digits add on -zint -o bar11.png -b 13 --height=50 --border=10 -d 7654321+21 -zint -o bar11.eps -b 13 --height=50 --border=10 -d 7654321+21 -zint -o bar11.svg -b 13 --height=50 --border=10 -d 7654321+21 +./zint -o bar11.txt -b 13 -d 7654321+21 +./zint -o bar11.gif -b 13 --height=50 --border=10 -d 7654321+21 +./zint -o bar11.svg -b 13 --height=50 --border=10 -d 7654321+21 echo testing EAN8 - 5 digits add-on -zint -o bar12.png -b 13 --height=50 --border=10 -d 7654321+54321 -zint -o bar12.eps -b 13 --height=50 --border=10 -d 7654321+54321 -zint -o bar12.svg -b 13 --height=50 --border=10 -d 7654321+54321 +./zint -o bar12.txt -b 13 -d 7654321+54321 +./zint -o bar12.gif -b 13 --height=50 --border=10 -d 7654321+54321 +./zint -o bar12.svg -b 13 --height=50 --border=10 -d 7654321+54321 echo testing EAN13 -zint -o bar13.png -b 13 --height=50 --border=10 -d 210987654321 -zint -o bar13.eps -b 13 --height=50 --border=10 -d 210987654321 -zint -o bar13.svg -b 13 --height=50 --border=10 -d 210987654321 +./zint -o bar13.txt -b 13 -d 210987654321 +./zint -o bar13.gif -b 13 --height=50 --border=10 -d 210987654321 +./zint -o bar13.svg -b 13 --height=50 --border=10 -d 210987654321 echo testing EAN13 - 2 digits add-on -zint -o bar14.png -b 13 --height=50 --border=10 -d 210987654321+21 -zint -o bar14.eps -b 13 --height=50 --border=10 -d 210987654321+21 -zint -o bar14.svg -b 13 --height=50 --border=10 -d 210987654321+21 +./zint -o bar14.txt -b 13 -d 210987654321+21 +./zint -o bar14.gif -b 13 --height=50 --border=10 -d 210987654321+21 +./zint -o bar14.svg -b 13 --height=50 --border=10 -d 210987654321+21 echo testing EAN13 - 5 digits add-on -zint -o bar15.png -b 13 --height=50 --border=10 -d 210987654321+54321 -zint -o bar15.eps -b 13 --height=50 --border=10 -d 210987654321+54321 -zint -o bar15.svg -b 13 --height=50 --border=10 -d 210987654321+54321 +./zint -o bar15.txt -b 13 -d 210987654321+54321 +./zint -o bar15.gif -b 13 --height=50 --border=10 -d 210987654321+54321 +./zint -o bar15.svg -b 13 --height=50 --border=10 -d 210987654321+54321 echo testing GS1-128 -zint -o bar16.png -b 16 --height=50 --border=10 -d "[01]98898765432106[3202]012345[15]991231" -zint -o bar16.eps -b 16 --height=50 --border=10 -d "[01]98898765432106[3202]012345[15]991231" -zint -o bar16.svg -b 16 --height=50 --border=10 -d "[01]98898765432106[3202]012345[15]991231" +./zint -o bar16.txt -b 16 -d "[01]98898765432106[3202]012345[15]991231" +./zint -o bar16.gif -b 16 --height=50 --border=10 -d "[01]98898765432106[3202]012345[15]991231" +./zint -o bar16.svg -b 16 --height=50 --border=10 -d "[01]98898765432106[3202]012345[15]991231" echo testing CodaBar -zint -o bar18.png -b 18 --height=50 --border=10 -d D765432C -zint -o bar18.eps -b 18 --height=50 --border=10 -d D765432C -zint -o bar18.svg -b 18 --height=50 --border=10 -d D765432C +./zint -o bar18.txt -b 18 -d D765432C +./zint -o bar18.gif -b 18 --height=50 --border=10 -d D765432C +./zint -o bar18.svg -b 18 --height=50 --border=10 -d D765432C echo testing Code 128 -zint -o bar20.png -b 20 --height=50 --border=10 -d 'Code 128' -zint -o bar20.eps -b 20 --height=50 --border=10 -d 'Code 128' -zint -o bar20.svg -b 20 --height=50 --border=10 -d 'Code 128' +./zint -o bar20.txt -b 20 -d 'Code 128' +./zint -o bar20.gif -b 20 --height=50 --border=10 -d 'Code 128' +./zint -o bar20.svg -b 20 --height=50 --border=10 -d 'Code 128' echo testing Deutsche Post Leitcode -zint -o bar21.png -b 21 --height=50 --border=10 -d 3210987654321 -zint -o bar21.eps -b 21 --height=50 --border=10 -d 3210987654321 -zint -o bar21.svg -b 21 --height=50 --border=10 -d 3210987654321 +./zint -o bar21.txt -b 21 -d 3210987654321 +./zint -o bar21.gif -b 21 --height=50 --border=10 -d 3210987654321 +./zint -o bar21.svg -b 21 --height=50 --border=10 -d 3210987654321 echo testing Deutsche Post Identcode -zint -o bar22.png -b 22 --height=50 --border=10 -d 10987654321 -zint -o bar22.eps -b 22 --height=50 --border=10 -d 10987654321 -zint -o bar22.svg -b 22 --height=50 --border=10 -d 10987654321 +./zint -o bar22.txt -b 22 -d 10987654321 +./zint -o bar22.gif -b 22 --height=50 --border=10 -d 10987654321 +./zint -o bar22.svg -b 22 --height=50 --border=10 -d 10987654321 echo testing Code 16k -zint -o bar23.png -b 23 --height=50 --border=10 -d "Demonstration Code 16k symbol generated by libzint" -zint -o bar23.eps -b 23 --height=50 --border=10 -d "Demonstration Code 16k symbol generated by libzint" -zint -o bar23.svg -b 23 --height=50 --border=10 -d "Demonstration Code 16k symbol generated by libzint" -zint -o bar23a.png -b 23 --gs1 --border=10 -d "[01]98898765432106[02]13012345678909[10]1234567ABCDEFG[3202]012345[15]991231" -zint -o bar23a.eps -b 23 --gs1 --border=10 -d "[01]98898765432106[02]13012345678909[10]1234567ABCDEFG[3202]012345[15]991231" -zint -o bar23a.svg -b 23 --gs1 --border=10 -d "[01]98898765432106[02]13012345678909[10]1234567ABCDEFG[3202]012345[15]991231" +./zint -o bar23.txt -b 23 -d "Demonstration Code 16k symbol generated by lib./zint" +./zint -o bar23.gif -b 23 --height=50 --border=10 -d "Demonstration Code 16k symbol generated by lib./zint" +./zint -o bar23.svg -b 23 --height=50 --border=10 -d "Demonstration Code 16k symbol generated by lib./zint" +./zint -o bar23a.txt -b 23 --gs1 -d "[01]98898765432106[02]13012345678909[10]1234567ABCDEFG[3202]012345[15]991231" +./zint -o bar23a.gif -b 23 --gs1 --border=10 -d "[01]98898765432106[02]13012345678909[10]1234567ABCDEFG[3202]012345[15]991231" +./zint -o bar23a.svg -b 23 --gs1 --border=10 -d "[01]98898765432106[02]13012345678909[10]1234567ABCDEFG[3202]012345[15]991231" echo testing Code 49 -zint -o bar24.png -b 24 -d "Demonstration Code 49" -zint -o bar24.eps -b 24 -d "Demonstration Code 49" -zint -o bar24.svg -b 24 -d "Demonstration Code 49" +./zint -o bar24.txt -b 24 -d "Demonstration Code 49" +./zint -o bar24.gif -b 24 -d "Demonstration Code 49" +./zint -o bar24.svg -b 24 -d "Demonstration Code 49" echo testing Code 93 -zint -o bar25.png -b 25 --height=50 --border=10 -d 'Code 93' -zint -o bar25.eps -b 25 --height=50 --border=10 -d 'Code 93' -zint -o bar25.svg -b 25 --height=50 --border=10 -d 'Code 93' +./zint -o bar25.txt -b 25 -d 'Code 93' +./zint -o bar25.gif -b 25 --height=50 --border=10 -d 'Code 93' +./zint -o bar25.svg -b 25 --height=50 --border=10 -d 'Code 93' echo testing Flattermarken -zint -o bar28.png -b 28 --height=50 --border=10 -d 87654321 -zint -o bar28.eps -b 28 --height=50 --border=10 -d 87654321 -zint -o bar28.svg -b 28 --height=50 --border=10 -d 87654321 +./zint -o bar28.txt -b 28 -d 87654321 +./zint -o bar28.gif -b 28 --height=50 --border=10 -d 87654321 +./zint -o bar28.svg -b 28 --height=50 --border=10 -d 87654321 echo testing DataBar-14 -zint -o bar29.png -b 29 --height=33 --border=10 -d 2001234567890 -zint -o bar29.eps -b 29 --height=33 --border=10 -d 2001234567890 -zint -o bar29.svg -b 29 --height=33 --border=10 -d 2001234567890 +./zint -o bar29.txt -b 29 -d 2001234567890 +./zint -o bar29.gif -b 29 --height=33 --border=10 -d 2001234567890 +./zint -o bar29.svg -b 29 --height=33 --border=10 -d 2001234567890 echo testing DataBar Limited -zint -o bar30.png -b 30 --height=50 --border=10 -w 2 -d 31234567890 -zint -o bar30.eps -b 30 --height=50 --border=10 -w 2 -d 31234567890 -zint -o bar30.svg -b 30 --height=50 --border=10 -w 2 -d 31234567890 +./zint -o bar30.txt -b 30 -w 2 -d 31234567890 +./zint -o bar30.gif -b 30 --height=50 --border=10 -w 2 -d 31234567890 +./zint -o bar30.svg -b 30 --height=50 --border=10 -w 2 -d 31234567890 echo testing DataBar Expanded -zint -o bar31.png -b 31 --height=50 --border=10 -d "[01]90012345678908[3103]001750" -zint -o bar31.eps -b 31 --height=50 --border=10 -d "[01]90012345678908[3103]001750" -zint -o bar31.svg -b 31 --height=50 --border=10 -d "[01]90012345678908[3103]001750" +./zint -o bar31.txt -b 31 -d "[01]90012345678908[3103]001750" +./zint -o bar31.gif -b 31 --height=50 --border=10 -d "[01]90012345678908[3103]001750" +./zint -o bar31.svg -b 31 --height=50 --border=10 -d "[01]90012345678908[3103]001750" echo testing Telepen Alpha -zint -o bar32.png -b 32 --height=50 --border=10 -d 'Telepen' -zint -o bar32.eps -b 32 --height=50 --border=10 -d 'Telepen' -zint -o bar32.svg -b 32 --height=50 --border=10 -d 'Telepen' +./zint -o bar32.txt -b 32 -d 'Telepen' +./zint -o bar32.gif -b 32 --height=50 --border=10 -d 'Telepen' +./zint -o bar32.svg -b 32 --height=50 --border=10 -d 'Telepen' echo testing UPC A -zint -o bar34.png -b 34 --height=50 --border=10 -d 10987654321 -zint -o bar34.eps -b 34 --height=50 --border=10 -d 10987654321 -zint -o bar34.svg -b 34 --height=50 --border=10 -d 10987654321 +./zint -o bar34.txt -b 34 -d 10987654321 +./zint -o bar34.gif -b 34 --height=50 --border=10 -d 10987654321 +./zint -o bar34.svg -b 34 --height=50 --border=10 -d 10987654321 echo testing UPC A - 2 digit add-on -zint -o bar35.png -b 34 --height=50 --border=10 -d 10987654321+21 -zint -o bar35.eps -b 34 --height=50 --border=10 -d 10987654321+21 -zint -o bar35.svg -b 34 --height=50 --border=10 -d 10987654321+21 +./zint -o bar35.txt -b 34 -d 10987654321+21 +./zint -o bar35.gif -b 34 --height=50 --border=10 -d 10987654321+21 +./zint -o bar35.svg -b 34 --height=50 --border=10 -d 10987654321+21 echo testing UPC A - 5 digit add-on -zint -o bar36.png -b 36 --height=50 --border=10 -d 10987654321+54321 -zint -o bar36.eps -b 36 --height=50 --border=10 -d 10987654321+54321 -zint -o bar36.svg -b 36 --height=50 --border=10 -d 10987654321+54321 +./zint -o bar36.txt -b 36 -d 10987654321+54321 +./zint -o bar36.gif -b 36 --height=50 --border=10 -d 10987654321+54321 +./zint -o bar36.svg -b 36 --height=50 --border=10 -d 10987654321+54321 echo testing UPC E -zint -o bar37.png -b 37 --height=50 --border=10 -d 654321 -zint -o bar37.eps -b 37 --height=50 --border=10 -d 654321 -zint -o bar37.svg -b 37 --height=50 --border=10 -d 654321 +./zint -o bar37.txt -b 37 -d 654321 +./zint -o bar37.gif -b 37 --height=50 --border=10 -d 654321 +./zint -o bar37.svg -b 37 --height=50 --border=10 -d 654321 echo testing UPC E - 2 digit add-on -zint -o bar38.png -b 37 --height=50 --border=10 -d 654321+21 -zint -o bar38.eps -b 37 --height=50 --border=10 -d 654321+21 -zint -o bar38.svg -b 37 --height=50 --border=10 -d 654321+21 +./zint -o bar38.txt -b 37 -d 654321+21 +./zint -o bar38.gif -b 37 --height=50 --border=10 -d 654321+21 +./zint -o bar38.svg -b 37 --height=50 --border=10 -d 654321+21 echo testing UPC E - 5 digit add-on -zint -o bar39.png -b 37 --height=50 --border=10 -d 654321+54321 -zint -o bar39.eps -b 37 --height=50 --border=10 -d 654321+54321 -zint -o bar39.svg -b 37 --height=50 --border=10 -d 654321+54321 +./zint -o bar39.txt -b 37 -d 654321+54321 +./zint -o bar39.gif -b 37 --height=50 --border=10 -d 654321+54321 +./zint -o bar39.svg -b 37 --height=50 --border=10 -d 654321+54321 echo testing PostNet-6 -zint -o bar41.png -b 40 --border=10 -d 54321 -zint -o bar41.eps -b 40 --border=10 -d 54321 -zint -o bar41.svg -b 40 --border=10 -d 54321 +./zint -o bar41.txt -b 40 -d 54321 +./zint -o bar41.gif -b 40 --border=10 -d 54321 +./zint -o bar41.svg -b 40 --border=10 -d 54321 echo testing PostNet-10 -zint -o bar43.png -b 40 --border=10 -d 987654321 -zint -o bar43.eps -b 40 --border=10 -d 987654321 -zint -o bar43.svg -b 40 --border=10 -d 987654321 +./zint -o bar43.txt -b 40 -d 987654321 +./zint -o bar43.gif -b 40 --border=10 -d 987654321 +./zint -o bar43.svg -b 40 --border=10 -d 987654321 echo testing PostNet-12 -zint -o bar45.png -b 40 --border=10 -d 10987654321 -zint -o bar45.eps -b 40 --border=10 -d 10987654321 -zint -o bar45.svg -b 40 --border=10 -d 10987654321 +./zint -o bar45.txt -b 40 -d 10987654321 +./zint -o bar45.gif -b 40 --border=10 -d 10987654321 +./zint -o bar45.svg -b 40 --border=10 -d 10987654321 echo testing MSI Code -zint -o bar47.png -b 47 --height=50 --border=10 -d 87654321 -zint -o bar47.eps -b 47 --height=50 --border=10 -d 87654321 -zint -o bar47.svg -b 47 --height=50 --border=10 -d 87654321 +./zint -o bar47.txt -b 47 -d 87654321 +./zint -o bar47.gif -b 47 --height=50 --border=10 -d 87654321 +./zint -o bar47.svg -b 47 --height=50 --border=10 -d 87654321 echo testing FIM -zint -o bar49.png -b 49 --height=50 --border=10 -d D -zint -o bar49.eps -b 49 --height=50 --border=10 -d D -zint -o bar49.svg -b 49 --height=50 --border=10 -d D +./zint -o bar49.txt -b 49 -d D +./zint -o bar49.gif -b 49 --height=50 --border=10 -d D +./zint -o bar49.svg -b 49 --height=50 --border=10 -d D echo testing LOGMARS -zint -o bar50.png -b 50 --height=50 --border=10 -d LOGMARS -zint -o bar50.eps -b 50 --height=50 --border=10 -d LOGMARS -zint -o bar50.svg -b 50 --height=50 --border=10 -d LOGMARS +./zint -o bar50.txt -b 50 -d LOGMARS +./zint -o bar50.gif -b 50 --height=50 --border=10 -d LOGMARS +./zint -o bar50.svg -b 50 --height=50 --border=10 -d LOGMARS echo testing Pharmacode One-Track -zint -o bar51.png -b 51 --height=50 --border=10 -d 123456 -zint -o bar51.eps -b 51 --height=50 --border=10 -d 123456 -zint -o bar51.svg -b 51 --height=50 --border=10 -d 123456 +./zint -o bar51.txt -b 51 -d 123456 +./zint -o bar51.gif -b 51 --height=50 --border=10 -d 123456 +./zint -o bar51.svg -b 51 --height=50 --border=10 -d 123456 echo testing Pharmazentralnumber -zint -o bar52.png -b 52 --height=50 --border=10 -d 654321 -zint -o bar52.eps -b 52 --height=50 --border=10 -d 654321 -zint -o bar52.svg -b 52 --height=50 --border=10 -d 654321 +./zint -o bar52.txt -b 52 -d 654321 +./zint -o bar52.gif -b 52 --height=50 --border=10 -d 654321 +./zint -o bar52.svg -b 52 --height=50 --border=10 -d 654321 echo testing Pharmacode Two-Track -zint -o bar53.png -b 53 --height=50 --border=10 -d 12345678 -zint -o bar53.eps -b 53 --height=50 --border=10 -d 12345678 -zint -o bar53.svg -b 53 --height=50 --border=10 -d 12345678 +./zint -o bar53.txt -b 53 --border=10 -d 12345678 +./zint -o bar53.gif -b 53 --height=50 --border=10 -d 12345678 +./zint -o bar53.svg -b 53 --height=50 --border=10 -d 12345678 echo testing PDF417 -zint -o bar55.png -b 55 --border=10 -d "Demonstration PDF417 symbol generated by libzint" -zint -o bar55.eps -b 55 --border=10 -d "Demonstration PDF417 symbol generated by libzint" -zint -o bar55.svg -b 55 --border=10 -d "Demonstration PDF417 symbol generated by libzint" +./zint -o bar55.txt -b 55 -d "Demonstration PDF417 symbol generated by libzint" +./zint -o bar55.gif -b 55 --border=10 -d "Demonstration PDF417 symbol generated by libzint" +./zint -o bar55.svg -b 55 --border=10 -d "Demonstration PDF417 symbol generated by libzint" echo testing PDF417 Truncated -zint -o bar56.png -b 56 --border=10 -d "Demonstration PDF417 symbol generated by libzint" -zint -o bar56.eps -b 56 --border=10 -d "Demonstration PDF417 symbol generated by libzint" -zint -o bar56.svg -b 56 --border=10 -d "Demonstration PDF417 symbol generated by libzint" +./zint -o bar56.txt -b 56 -d "Demonstration PDF417 symbol generated by libzint" +./zint -o bar56.gif -b 56 --border=10 -d "Demonstration PDF417 symbol generated by libzint" +./zint -o bar56.svg -b 56 --border=10 -d "Demonstration PDF417 symbol generated by libzint" echo testing Maxicode -zint -o bar57.png -b 57 --border=10 --primary="999999999840012" -d "Demonstration Maxicode symbol generated by libzint" -zint -o bar57.eps -b 57 --border=10 --primary="999999999840012" -d "Demonstration Maxicode symbol generated by libzint" -zint -o bar57.svg -b 57 --border=10 --primary="999999999840012" -d "Demonstration Maxicode symbol generated by libzint" +./zint -o bar57.txt -b 57 --primary="999999999840012" -d "Demonstration Maxicode symbol generated by libzint" +./zint -o bar57.gif -b 57 --border=10 --primary="999999999840012" -d "Demonstration Maxicode symbol generated by libzint" +./zint -o bar57.svg -b 57 --border=10 --primary="999999999840012" -d "Demonstration Maxicode symbol generated by libzint" echo testing QR Code -zint -o bar58.png -b 58 --border=10 -d "Demonstration QR Code symbol generated by libzint" -zint -o bar58.eps -b 58 --border=10 -d "Demonstration QR Code symbol generated by libzint" -zint -o bar58.svg -b 58 --border=10 -d "Demonstration QR Code symbol generated by libzint" -zint -o bar58k.png -b 58 --kanji --border=10 -d "画像内の単語を非表示にする" -zint -o bar58k.eps -b 58 --kanji --border=10 -d "画像内の単語を非表示にする" -zint -o bar58k.svg -b 58 --kanji --border=10 -d "画像内の単語を非表示にする" +./zint -o bar58.txt -b 58 -d "Demonstration QR Code symbol generated by libzint" +./zint -o bar58.gif -b 58 --border=10 -d "Demonstration QR Code symbol generated by libzint" +./zint -o bar58.svg -b 58 --border=10 -d "Demonstration QR Code symbol generated by libzint" +./zint -o bar58k.txt -b 58 --kanji -d "画像内の単語を非表示にする" +./zint -o bar58k.gif -b 58 --kanji --border=10 -d "画像内の単語を非表示にする" +./zint -o bar58k.svg -b 58 --kanji --border=10 -d "画像内の単語を非表示にする" echo testing Code 128 Subset B -zint -o bar60.png -b 60 --height=50 --border=10 -d 87654321 -zint -o bar60.eps -b 60 --height=50 --border=10 -d 87654321 -zint -o bar60.svg -b 60 --height=50 --border=10 -d 87654321 +./zint -o bar60.txt -b 60 -d 87654321 +./zint -o bar60.gif -b 60 --height=50 --border=10 -d 87654321 +./zint -o bar60.svg -b 60 --height=50 --border=10 -d 87654321 echo testing Australian Post Standard Customer -zint -o bar63.png -b 63 --border=10 -d 87654321 -zint -o bar63.eps -b 63 --border=10 -d 87654321 -zint -o bar63.svg -b 63 --border=10 -d 87654321 +./zint -o bar63.txt -b 63 -d 87654321 +./zint -o bar63.gif -b 63 --border=10 -d 87654321 +./zint -o bar63.svg -b 63 --border=10 -d 87654321 echo testing Australian Post Customer 2 -zint -o bar64.png -b 63 --border=10 -d 87654321AUSPS -zint -o bar64.eps -b 63 --border=10 -d 87654321AUSPS -zint -o bar64.svg -b 63 --border=10 -d 87654321AUSPS +./zint -o bar64.txt -b 63 -d 87654321AUSPS +./zint -o bar64.gif -b 63 --border=10 -d 87654321AUSPS +./zint -o bar64.svg -b 63 --border=10 -d 87654321AUSPS echo testing Australian Post Customer 3 -zint -o bar65.png -b 63 --border=10 -d '87654321 AUSTRALIA' -zint -o bar65.eps -b 63 --border=10 -d '87654321 AUSTRALIA' -zint -o bar65.svg -b 63 --border=10 -d '87654321 AUSTRALIA' +./zint -o bar65.txt -b 63 -d '87654321 AUSTRALIA' +./zint -o bar65.gif -b 63 --border=10 -d '87654321 AUSTRALIA' +./zint -o bar65.svg -b 63 --border=10 -d '87654321 AUSTRALIA' echo testing Australian Post Reply Paid -zint -o bar66.png -b 66 --border=10 -d 87654321 -zint -o bar66.eps -b 66 --border=10 -d 87654321 -zint -o bar66.svg -b 66 --border=10 -d 87654321 +./zint -o bar66.txt -b 66 -d 87654321 +./zint -o bar66.gif -b 66 --border=10 -d 87654321 +./zint -o bar66.svg -b 66 --border=10 -d 87654321 echo testing Australian Post Routing -zint -o bar67.png -b 67 --border=10 -d 87654321 -zint -o bar67.eps -b 67 --border=10 -d 87654321 -zint -o bar67.svg -b 67 --border=10 -d 87654321 +./zint -o bar67.txt -b 67 -d 87654321 +./zint -o bar67.gif -b 67 --border=10 -d 87654321 +./zint -o bar67.svg -b 67 --border=10 -d 87654321 echo testing Australian Post Redirection -zint -o bar68.png -b 68 --border=10 -d 87654321 -zint -o bar68.eps -b 68 --border=10 -d 87654321 -zint -o bar68.svg -b 68 --border=10 -d 87654321 +./zint -o bar68.txt -b 68 -d 87654321 +./zint -o bar68.gif -b 68 --border=10 -d 87654321 +./zint -o bar68.svg -b 68 --border=10 -d 87654321 echo testing ISBN Code -zint -o bar69.png -b 69 --height=50 --border=10 -d 0333638514 -zint -o bar69.eps -b 69 --height=50 --border=10 -d 0333638514 -zint -o bar69.svg -b 69 --height=50 --border=10 -d 0333638514 +./zint -o bar69.txt -b 69 -d 0333638514 +./zint -o bar69.gif -b 69 --height=50 --border=10 -d 0333638514 +./zint -o bar69.svg -b 69 --height=50 --border=10 -d 0333638514 echo testing Royal Mail 4 State -zint -o bar70.png -b 70 --border=10 -d ROYALMAIL -zint -o bar70.eps -b 70 --border=10 -d ROYALMAIL -zint -o bar70.svg -b 70 --border=10 -d ROYALMAIL +./zint -o bar70.txt -b 70 -d ROYALMAIL +./zint -o bar70.gif -b 70 --border=10 -d ROYALMAIL +./zint -o bar70.svg -b 70 --border=10 -d ROYALMAIL echo testing Data Matrix -zint -o bar71.png -b 71 --border=10 -d "Demonstration Data Matrix symbol generated by libzint" -zint -o bar71.eps -b 71 --border=10 -d "Demonstration Data Matrix symbol generated by libzint" -zint -o bar71.svg -b 71 --border=10 -d "Demonstration Data Matrix symbol generated by libzint" -zint -o bar71a.png -b 71 --gs1 --border=10 -d "[01]98898765432106[02]13012345678909[10]1234567ABCDEFG[3202]012345[15]991231" -zint -o bar71a.eps -b 71 --gs1 --border=10 -d "[01]98898765432106[02]13012345678909[10]1234567ABCDEFG[3202]012345[15]991231" -zint -o bar71a.svg -b 71 --gs1 --border=10 -d "[01]98898765432106[02]13012345678909[10]1234567ABCDEFG[3202]012345[15]991231" +./zint -o bar71.txt -b 71 -d "Demonstration Data Matrix symbol generated by libzint" +./zint -o bar71.gif -b 71 --border=10 -d "Demonstration Data Matrix symbol generated by libzint" +./zint -o bar71.svg -b 71 --border=10 -d "Demonstration Data Matrix symbol generated by libzint" +./zint -o bar71a.txt -b 71 --gs1 -d "[01]98898765432106[02]13012345678909[10]1234567ABCDEFG[3202]012345[15]991231" +./zint -o bar71a.gif -b 71 --gs1 --border=10 -d "[01]98898765432106[02]13012345678909[10]1234567ABCDEFG[3202]012345[15]991231" +./zint -o bar71a.svg -b 71 --gs1 --border=10 -d "[01]98898765432106[02]13012345678909[10]1234567ABCDEFG[3202]012345[15]991231" echo testing EAN-14 -zint -o bar72.png -b 72 --height=50 --border=10 -d 3210987654321 -zint -o bar72.eps -b 72 --height=50 --border=10 -d 3210987654321 -zint -o bar72.svg -b 72 --height=50 --border=10 -d 3210987654321 +./zint -o bar72.txt -b 72 -d 3210987654321 +./zint -o bar72.gif -b 72 --height=50 --border=10 -d 3210987654321 +./zint -o bar72.svg -b 72 --height=50 --border=10 -d 3210987654321 echo testing NVE-18 -zint -o bar75.png -b 75 --height=50 --border=10 -d 76543210987654321 -zint -o bar75.eps -b 75 --height=50 --border=10 -d 76543210987654321 -zint -o bar75.svg -b 75 --height=50 --border=10 -d 76543210987654321 +./zint -o bar75.txt -b 75 -d 76543210987654321 +./zint -o bar75.gif -b 75 --height=50 --border=10 -d 76543210987654321 +./zint -o bar75.svg -b 75 --height=50 --border=10 -d 76543210987654321 echo testing Japanese Post -zint -o bar76.png -b 76 --border=10 -d "10000131-3-2-503" -zint -o bar76.eps -b 76 --border=10 -d "10000131-3-2-503" -zint -o bar76.svg -b 76 --border=10 -d "10000131-3-2-503" +./zint -o bar76.txt -b 76 -d "10000131-3-2-503" +./zint -o bar76.gif -b 76 --border=10 -d "10000131-3-2-503" +./zint -o bar76.svg -b 76 --border=10 -d "10000131-3-2-503" echo testing Korea Post -zint -o bar77.png -b 77 --height=50 --border=10 -d 123456 -zint -o bar77.eps -b 77 --height=50 --border=10 -d 123456 -zint -o bar77.svg -b 77 --height=50 --border=10 -d 123456 +./zint -o bar77.txt -b 77 -d 123456 +./zint -o bar77.gif -b 77 --height=50 --border=10 -d 123456 +./zint -o bar77.svg -b 77 --height=50 --border=10 -d 123456 echo testing DataBar Truncated -zint -o bar78.png -b 29 --height=13 --border=10 -d 1234567890 -zint -o bar78.eps -b 29 --height=13 --border=10 -d 1234567890 -zint -o bar78.svg -b 29 --height=13 --border=10 -d 1234567890 +./zint -o bar78.txt -b 29 -d 1234567890 +./zint -o bar78.gif -b 29 --height=13 --border=10 -d 1234567890 +./zint -o bar78.svg -b 29 --height=13 --border=10 -d 1234567890 echo testing DataBar Stacked -zint -o bar79.png -b 79 --border=10 -d 1234567890 -zint -o bar79.eps -b 79 --border=10 -d 1234567890 -zint -o bar79.svg -b 79 --border=10 -d 1234567890 +./zint -o bar79.txt -b 79 -d 1234567890 +./zint -o bar79.gif -b 79 --border=10 -d 1234567890 +./zint -o bar79.svg -b 79 --border=10 -d 1234567890 echo testing DataBar Stacked Omnidirectional -zint -o bar80.png -b 80 --height=69 --border=10 -d 3456789012 -zint -o bar80.eps -b 80 --height=69 --border=10 -d 3456789012 -zint -o bar80.svg -b 80 --height=69 --border=10 -d 3456789012 +./zint -o bar80.txt -b 80 -d 3456789012 +./zint -o bar80.gif -b 80 --height=69 --border=10 -d 3456789012 +./zint -o bar80.svg -b 80 --height=69 --border=10 -d 3456789012 echo testing DataBar Expanded Stacked -zint -o bar81.png -b 81 --border=10 -d "[01]98898765432106[3202]012345[15]991231" -zint -o bar81.eps -b 81 --border=10 -d "[01]98898765432106[3202]012345[15]991231" -zint -o bar81.svg -b 81 --border=10 -d "[01]98898765432106[3202]012345[15]991231" +./zint -o bar81.txt -b 81 -d "[01]98898765432106[3202]012345[15]991231" +./zint -o bar81.gif -b 81 --border=10 -d "[01]98898765432106[3202]012345[15]991231" +./zint -o bar81.svg -b 81 --border=10 -d "[01]98898765432106[3202]012345[15]991231" echo testing Planet 12 Digit -zint -o bar82.png -b 82 --border=10 -d 10987654321 -zint -o bar82.eps -b 82 --border=10 -d 10987654321 -zint -o bar82.svg -b 82 --border=10 -d 10987654321 +./zint -o bar82.txt -b 82 -d 10987654321 +./zint -o bar82.gif -b 82 --border=10 -d 10987654321 +./zint -o bar82.svg -b 82 --border=10 -d 10987654321 echo testing Planet 14 Digit -zint -o bar83.png -b 82 --border=10 -d 3210987654321 -zint -o bar83.eps -b 82 --border=10 -d 3210987654321 -zint -o bar83.svg -b 82 --border=10 -d 3210987654321 +./zint -o bar83.txt -b 82 -d 3210987654321 +./zint -o bar83.gif -b 82 --border=10 -d 3210987654321 +./zint -o bar83.svg -b 82 --border=10 -d 3210987654321 echo testing Micro PDF417 -zint -o bar84.png -b 84 --border=10 -d "Demonstration MicroPDF417 symbol generated by libzint" -zint -o bar84.eps -b 84 --border=10 -d "Demonstration MicroPDF417 symbol generated by libzint" -zint -o bar84.svg -b 84 --border=10 -d "Demonstration MicroPDF417 symbol generated by libzint" +./zint -o bar84.txt -b 84 -d "Demonstration MicroPDF417 symbol generated by libzint" +./zint -o bar84.gif -b 84 --border=10 -d "Demonstration MicroPDF417 symbol generated by libzint" +./zint -o bar84.svg -b 84 --border=10 -d "Demonstration MicroPDF417 symbol generated by libzint" echo testing USPS OneCode 4-State Customer Barcode -zint -o bar85.png -b 85 --border=10 -d 01234567094987654321 -zint -o bar85.eps -b 85 --border=10 -d 01234567094987654321 -zint -o bar85.svg -b 85 --border=10 -d 01234567094987654321 +./zint -o bar85.txt -b 85 -d 01234567094987654321 +./zint -o bar85.gif -b 85 --border=10 -d 01234567094987654321 +./zint -o bar85.svg -b 85 --border=10 -d 01234567094987654321 echo testing Plessey Code with bidirectional reading support -zint -o bar86.png -b 86 --height=50 --border=10 -d 87654321 -zint -o bar86.eps -b 86 --height=50 --border=10 -d 87654321 -zint -o bar86.svg -b 86 --height=50 --border=10 -d 87654321 +./zint -o bar86.txt -b 86 -d 87654321 +./zint -o bar86.gif -b 86 --height=50 --border=10 -d 87654321 +./zint -o bar86.svg -b 86 --height=50 --border=10 -d 87654321 echo testing Telepen Numeric -zint -o bar87.png -b 87 --height=50 --border=10 -d 87654321 -zint -o bar87.eps -b 87 --height=50 --border=10 -d 87654321 -zint -o bar87.svg -b 87 --height=50 --border=10 -d 87654321 +./zint -o bar87.txt -b 87 -d 87654321 +./zint -o bar87.gif -b 87 --height=50 --border=10 -d 87654321 +./zint -o bar87.svg -b 87 --height=50 --border=10 -d 87654321 echo testing ITF-14 -zint -o bar89.png -b 89 --height=50 --border=10 -d 3210987654321 -zint -o bar89.eps -b 89 --height=50 --border=10 -d 3210987654321 -zint -o bar89.svg -b 89 --height=50 --border=10 -d 3210987654321 +./zint -o bar89.txt -b 89 -d 3210987654321 +./zint -o bar89.gif -b 89 --height=50 --border=10 -d 3210987654321 +./zint -o bar89.svg -b 89 --height=50 --border=10 -d 3210987654321 echo testing KIX Code -zint -o bar90.png -b 90 --border=10 -d '1231FZ13Xhs' -zint -o bar90.eps -b 90 --border=10 -d '1231FZ13Xhs' -zint -o bar90.svg -b 90 --border=10 -d '1231FZ13Xhs' +./zint -o bar90.txt -b 90 -d '1231FZ13Xhs' +./zint -o bar90.gif -b 90 --border=10 -d '1231FZ13Xhs' +./zint -o bar90.svg -b 90 --border=10 -d '1231FZ13Xhs' echo testing Aztec Code -zint -o bar92.png -b 92 --border=10 -d "Demonstration Aztec Code symbol generated by libzint" -zint -o bar92.eps -b 92 --border=10 -d "Demonstration Aztec Code symbol generated by libzint" -zint -o bar92.svg -b 92 --border=10 -d "Demonstration Aztec Code symbol generated by libzint" -zint -o bar92a.png -b 92 --gs1 --border=10 -d "[01]98898765432106[02]13012345678909[10]1234567ABCDEFG[3202]012345[15]991231" -zint -o bar92a.eps -b 92 --gs1 --border=10 -d "[01]98898765432106[02]13012345678909[10]1234567ABCDEFG[3202]012345[15]991231" -zint -o bar92a.svg -b 92 --gs1 --border=10 -d "[01]98898765432106[02]13012345678909[10]1234567ABCDEFG[3202]012345[15]991231" +./zint -o bar92.txt -b 92 -d "Demonstration Aztec Code symbol generated by libzint" +./zint -o bar92.gif -b 92 --border=10 -d "Demonstration Aztec Code symbol generated by libzint" +./zint -o bar92.svg -b 92 --border=10 -d "Demonstration Aztec Code symbol generated by libzint" +./zint -o bar92a.txt -b 92 --gs1 -d "[01]98898765432106[02]13012345678909[10]1234567ABCDEFG[3202]012345[15]991231" +./zint -o bar92a.gif -b 92 --gs1 --border=10 -d "[01]98898765432106[02]13012345678909[10]1234567ABCDEFG[3202]012345[15]991231" +./zint -o bar92a.svg -b 92 --gs1 --border=10 -d "[01]98898765432106[02]13012345678909[10]1234567ABCDEFG[3202]012345[15]991231" echo testing DAFT Code -zint -o bar93.png -b 93 --border=10 -d "daftdaftdaftdaftdaftdaftdaftdaftdaft" -zint -o bar93.eps -b 93 --border=10 -d "daftdaftdaftdaftdaftdaftdaftdaftdaft" -zint -o bar93.svg -b 93 --border=10 -d "daftdaftdaftdaftdaftdaftdaftdaftdaft" +./zint -o bar93.txt -b 93 -d "daftdaftdaftdaftdaftdaftdaftdaftdaft" +./zint -o bar93.gif -b 93 --border=10 -d "daftdaftdaftdaftdaftdaftdaftdaftdaft" +./zint -o bar93.svg -b 93 --border=10 -d "daftdaftdaftdaftdaftdaftdaftdaftdaft" echo testing Micro QR Code -zint -o bar97.png -b 97 --border=10 -d "MicroQR Code" -zint -o bar97.eps -b 97 --border=10 -d "MicroQR Code" -zint -o bar97.svg -b 97 --border=10 -d "MicroQR Code" -zint -o bar97k.png -b 97 --kanji --border=10 -d "小さい" -zint -o bar97k.eps -b 97 --kanji --border=10 -d "小さい" -zint -o bar97k.svg -b 97 --kanji --border=10 -d "小さい" +./zint -o bar97.txt -b 97 -d "MicroQR Code" +./zint -o bar97.gif -b 97 --border=10 -d "MicroQR Code" +./zint -o bar97.svg -b 97 --border=10 -d "MicroQR Code" +./zint -o bar97k.txt -b 97 --kanji -d "小さい" +./zint -o bar97k.gif -b 97 --kanji --border=10 -d "小さい" +./zint -o bar97k.svg -b 97 --kanji --border=10 -d "小さい" echo testing HIBC LIC 128 -zint -o bar98.png -b 98 --border=10 -d "A99912345/9901510X3" -zint -o bar98.eps -b 98 --border=10 -d "A99912345/9901510X3" -zint -o bar98.svg -b 98 --border=10 -d "A99912345/9901510X3" +./zint -o bar98.txt -b 98 -d "A99912345/9901510X3" +./zint -o bar98.gif -b 98 --border=10 -d "A99912345/9901510X3" +./zint -o bar98.svg -b 98 --border=10 -d "A99912345/9901510X3" echo testing HIBC LIC 39 -zint -o bar99.png -b 99 --border=10 -d "A123BJC5D6E71" -zint -o bar99.eps -b 99 --border=10 -d "A123BJC5D6E71" -zint -o bar99.svg -b 99 --border=10 -d "A123BJC5D6E71" +./zint -o bar99.txt -b 99 -d "A123BJC5D6E71" +./zint -o bar99.gif -b 99 --border=10 -d "A123BJC5D6E71" +./zint -o bar99.svg -b 99 --border=10 -d "A123BJC5D6E71" echo testing HIBC LIC Data Matrix -zint -o bar102.png -b 102 --border=10 -d "A99912345/9901510X3" -zint -o bar102.eps -b 102 --border=10 -d "A99912345/9901510X3" -zint -o bar102.svg -b 102 --border=10 -d "A99912345/9901510X3" +./zint -o bar102.txt -b 102 -d "A99912345/9901510X3" +./zint -o bar102.gif -b 102 --border=10 -d "A99912345/9901510X3" +./zint -o bar102.svg -b 102 --border=10 -d "A99912345/9901510X3" echo testing HIBC LIC QR-Code -zint -o bar104.png -b 104 --border=10 -d "A99912345/9901510X3" -zint -o bar104.eps -b 104 --border=10 -d "A99912345/9901510X3" -zint -o bar104.svg -b 104 --border=10 -d "A99912345/9901510X3" +./zint -o bar104.txt -b 104 -d "A99912345/9901510X3" +./zint -o bar104.gif -b 104 --border=10 -d "A99912345/9901510X3" +./zint -o bar104.svg -b 104 --border=10 -d "A99912345/9901510X3" echo testing HIBC LIC PDF417 -zint -o bar106.png -b 106 --border=10 -d "A99912345/9901510X3" -zint -o bar106.eps -b 106 --border=10 -d "A99912345/9901510X3" -zint -o bar106.svg -b 106 --border=10 -d "A99912345/9901510X3" +./zint -o bar106.txt -b 106 -d "A99912345/9901510X3" +./zint -o bar106.gif -b 106 --border=10 -d "A99912345/9901510X3" +./zint -o bar106.svg -b 106 --border=10 -d "A99912345/9901510X3" echo testing HIBC LIC MicroPDF417 -zint -o bar108.png -b 108 --border=10 -d "A99912345/9901510X3" -zint -o bar108.eps -b 108 --border=10 -d "A99912345/9901510X3" -zint -o bar108.svg -b 108 --border=10 -d "A99912345/9901510X3" +./zint -o bar108.txt -b 108 -d "A99912345/9901510X3" +./zint -o bar108.gif -b 108 --border=10 -d "A99912345/9901510X3" +./zint -o bar108.svg -b 108 --border=10 -d "A99912345/9901510X3" echo testing HIBC LIC Aztec Code -zint -o bar112.png -b 112 --border=10 -d "A99912345/9901510X3" -zint -o bar112.eps -b 112 --border=10 -d "A99912345/9901510X3" -zint -o bar112.svg -b 112 --border=10 -d "A99912345/9901510X3" +./zint -o bar112.txt -b 112 -d "A99912345/9901510X3" +./zint -o bar112.gif -b 112 --border=10 -d "A99912345/9901510X3" +./zint -o bar112.svg -b 112 --border=10 -d "A99912345/9901510X3" +echo testing DotCode +./zint -o bar115.txt -b 115 -d "Demonstration DotCode symbol generated by libzint" +./zint -o bar115.gif -b 115 --scale=5 --border=10 -d "Demonstration DotCode symbol generated by libzint" +./zint -o bar115.svg -b 115 --scale=5 --border=10 -d "Demonstration DotCode symbol generated by libzint" +./zint -o bar115a.txt -b 115 --gs1 -d "[01]98898765432106[3202]012345[15]991231" +./zint -o bar115a.gif -b 115 --gs1 --scale=5 --border=10 -d "[01]98898765432106[3202]012345[15]991231" +./zint -o bar115a.svg -b 115 --gs1 --scale=5 --border=10 -d "[01]98898765432106[3202]012345[15]991231" +echo testing Han Xin Code +./zint -o bar116.txt -b 116 -d "Demonstration DotCode symbol generated by libzint" +./zint -o bar116.gif -b 116 --scale=5 --border=10 -d "Demonstration DotCode symbol generated by libzint" +./zint -o bar116.svg -b 116 --scale=5 --border=10 -d "Demonstration DotCode symbol generated by libzint" echo testing Aztec Runes -zint -o bar128.png -b 128 --border=10 -d 125 -zint -o bar128.eps -b 128 --border=10 -d 125 -zint -o bar128.svg -b 128 --border=10 -d 125 +./zint -o bar128.txt -b 128 -d 125 +./zint -o bar128.gif -b 128 --border=10 -d 125 +./zint -o bar128.svg -b 128 --border=10 -d 125 echo testing Code 23 -zint -o bar129.png -b 129 --border=10 -d "12345678" -zint -o bar129.eps -b 129 --border=10 -d "12345678" -zint -o bar129.svg -b 129 --border=10 -d "12345678" +./zint -o bar129.txt -b 129 -d "12345678" +./zint -o bar129.gif -b 129 --border=10 -d "12345678" +./zint -o bar129.svg -b 129 --border=10 -d "12345678" echo testing EAN-8 Composite with CC-A -zint -o bar130.png -b 130 --height=100 --border=10 --mode=1 --primary=1234567 -d "[21]A12345678" -zint -o bar130.eps -b 130 --height=100 --border=10 --mode=1 --primary=1234567 -d "[21]A12345678" -zint -o bar130.svg -b 130 --height=100 --border=10 --mode=1 --primary=1234567 -d "[21]A12345678" +./zint -o bar130.txt -b 130 --mode=1 --primary=1234567 -d "[21]A12345678" +./zint -o bar130.gif -b 130 --height=100 --border=10 --mode=1 --primary=1234567 -d "[21]A12345678" +./zint -o bar130.svg -b 130 --height=100 --border=10 --mode=1 --primary=1234567 -d "[21]A12345678" echo testing EAN-13 Composite with CC-A -zint -o bar130a.png -b 130 --height=100 --border=10 --mode=1 --primary=331234567890 -d "[99]1234-abcd" -zint -o bar130a.eps -b 130 --height=100 --border=10 --mode=1 --primary=331234567890 -d "[99]1234-abcd" -zint -o bar130a.svg -b 130 --height=100 --border=10 --mode=1 --primary=331234567890 -d "[99]1234-abcd" +./zint -o bar130a.txt -b 130 --mode=1 --primary=331234567890 -d "[99]1234-abcd" +./zint -o bar130a.gif -b 130 --height=100 --border=10 --mode=1 --primary=331234567890 -d "[99]1234-abcd" +./zint -o bar130a.svg -b 130 --height=100 --border=10 --mode=1 --primary=331234567890 -d "[99]1234-abcd" echo testing UCC/EAN-128 Composite with CC-A -zint -o bar131.png -b 131 --height=100 --border=10 --mode=1 --primary="[01]03212345678906" -d "[10]1234567ABCDEFG" -zint -o bar131.eps -b 131 --height=100 --border=10 --mode=1 --primary="[01]03212345678906" -d "[10]1234567ABCDEFG" -zint -o bar131.svg -b 131 --height=100 --border=10 --mode=1 --primary="[01]03212345678906" -d "[10]1234567ABCDEFG" +./zint -o bar131.txt -b 131 --mode=1 --primary="[01]03212345678906" -d "[10]1234567ABCDEFG" +./zint -o bar131.gif -b 131 --height=100 --border=10 --mode=1 --primary="[01]03212345678906" -d "[10]1234567ABCDEFG" +./zint -o bar131.svg -b 131 --height=100 --border=10 --mode=1 --primary="[01]03212345678906" -d "[10]1234567ABCDEFG" echo testing UCC/EAN-128 Composite with CC-C -zint -o bar131a.png -b 131 --height=100 --border=10 --mode=3 --primary="[00]030123456789012340" -d "[02]13012345678909[10]1234567ABCDEFG" -zint -o bar131a.eps -b 131 --height=100 --border=10 --mode=3 --primary="[00]030123456789012340" -d "[02]13012345678909[10]1234567ABCDEFG" -zint -o bar131a.svg -b 131 --height=100 --border=10 --mode=3 --primary="[00]030123456789012340" -d "[02]13012345678909[10]1234567ABCDEFG" +./zint -o bar131a.txt -b 131 --mode=3 --primary="[00]030123456789012340" -d "[02]13012345678909[10]1234567ABCDEFG" +./zint -o bar131a.gif -b 131 --height=100 --border=10 --mode=3 --primary="[00]030123456789012340" -d "[02]13012345678909[10]1234567ABCDEFG" +./zint -o bar131a.svg -b 131 --height=100 --border=10 --mode=3 --primary="[00]030123456789012340" -d "[02]13012345678909[10]1234567ABCDEFG" echo testing DataBar-14 Composite with CC-A -zint -o bar132.png -b 132 --height=100 --border=10 --mode=1 --primary=361234567890 -d "[11]990102" -zint -o bar132.eps -b 132 --height=100 --border=10 --mode=1 --primary=361234567890 -d "[11]990102" -zint -o bar132.svg -b 132 --height=100 --border=10 --mode=1 --primary=361234567890 -d "[11]990102" +./zint -o bar132.txt -b 132 --mode=1 --primary=361234567890 -d "[11]990102" +./zint -o bar132.gif -b 132 --height=100 --border=10 --mode=1 --primary=361234567890 -d "[11]990102" +./zint -o bar132.svg -b 132 --height=100 --border=10 --mode=1 --primary=361234567890 -d "[11]990102" echo testing DataBar Limited Composite with CC-B -zint -o bar133.png -b 133 --height=100 --border=10 --mode=2 --primary=351234567890 -d "[21]abcdefghijklmnopqrstuv" -zint -o bar133.eps -b 133 --height=100 --border=10 --mode=2 --primary=351234567890 -d "[21]abcdefghijklmnopqrstuv" -zint -o bar133.svg -b 133 --height=100 --border=10 --mode=2 --primary=351234567890 -d "[21]abcdefghijklmnopqrstuv" +./zint -o bar133.txt -b 133 --mode=2 --primary=351234567890 -d "[21]abcdefghijklmnopqrstuv" +./zint -o bar133.gif -b 133 --height=100 --border=10 --mode=2 --primary=351234567890 -d "[21]abcdefghijklmnopqrstuv" +./zint -o bar133.svg -b 133 --height=100 --border=10 --mode=2 --primary=351234567890 -d "[21]abcdefghijklmnopqrstuv" echo testing DataBar Expanded Composite with CC-A -zint -o bar134.png -b 134 --height=100 --border=10 --mode=1 --primary="[01]93712345678904[3103]001234" -d "[91]1A2B3C4D5E" -zint -o bar134.eps -b 134 --height=100 --border=10 --mode=1 --primary="[01]93712345678904[3103]001234" -d "[91]1A2B3C4D5E" -zint -o bar134.svg -b 134 --height=100 --border=10 --mode=1 --primary="[01]93712345678904[3103]001234" -d "[91]1A2B3C4D5E" +./zint -o bar134.txt -b 134 --mode=1 --primary="[01]93712345678904[3103]001234" -d "[91]1A2B3C4D5E" +./zint -o bar134.gif -b 134 --height=100 --border=10 --mode=1 --primary="[01]93712345678904[3103]001234" -d "[91]1A2B3C4D5E" +./zint -o bar134.svg -b 134 --height=100 --border=10 --mode=1 --primary="[01]93712345678904[3103]001234" -d "[91]1A2B3C4D5E" echo testing UPC-A Composite with CC-A -zint -o bar135.png -b 135 --height=100 --border=10 --mode=1 --primary=10987654321 -d "[15]021231" -zint -o bar135.eps -b 135 --height=100 --border=10 --mode=1 --primary=10987654321 -d "[15]021231" -zint -o bar135.svg -b 135 --height=100 --border=10 --mode=1 --primary=10987654321 -d "[15]021231" +./zint -o bar135.txt -b 135 --mode=1 --primary=10987654321 -d "[15]021231" +./zint -o bar135.gif -b 135 --height=100 --border=10 --mode=1 --primary=10987654321 -d "[15]021231" +./zint -o bar135.svg -b 135 --height=100 --border=10 --mode=1 --primary=10987654321 -d "[15]021231" echo testing UPC-E Composite with CC-A -zint -o bar136.png -b 136 --height=100 --border=10 --mode=1 --primary=121230 -d "[15]021231" -zint -o bar136.eps -b 136 --height=100 --border=10 --mode=1 --primary=121230 -d "[15]021231" -zint -o bar136.svg -b 136 --height=100 --border=10 --mode=1 --primary=121230 -d "[15]021231" +./zint -o bar136.txt -b 136 --mode=1 --primary=121230 -d "[15]021231" +./zint -o bar136.gif -b 136 --height=100 --border=10 --mode=1 --primary=121230 -d "[15]021231" +./zint -o bar136.svg -b 136 --height=100 --border=10 --mode=1 --primary=121230 -d "[15]021231" echo testing DataBar-14 Stacked Composite with CC-A -zint -o bar137.png -b 137 --border=10 --mode=1 --primary=341234567890 -d "[17]010200" -zint -o bar137.eps -b 137 --border=10 --mode=1 --primary=341234567890 -d "[17]010200" -zint -o bar137.svg -b 137 --border=10 --mode=1 --primary=341234567890 -d "[17]010200" +./zint -o bar137.txt -b 137 --mode=1 --primary=341234567890 -d "[17]010200" +./zint -o bar137.gif -b 137 --border=10 --mode=1 --primary=341234567890 -d "[17]010200" +./zint -o bar137.svg -b 137 --border=10 --mode=1 --primary=341234567890 -d "[17]010200" echo testing DataBar-14 Stacked Omnidirectional Composite with CC-A -zint -o bar138.png -b 138 --border=10 --mode=1 --primary=341234567890 -d "[17]010200" -zint -o bar138.eps -b 138 --border=10 --mode=1 --primary=341234567890 -d "[17]010200" -zint -o bar138.svg -b 138 --border=10 --mode=1 --primary=341234567890 -d "[17]010200" +./zint -o bar138.txt -b 138 --mode=1 --primary=341234567890 -d "[17]010200" +./zint -o bar138.gif -b 138 --border=10 --mode=1 --primary=341234567890 -d "[17]010200" +./zint -o bar138.svg -b 138 --border=10 --mode=1 --primary=341234567890 -d "[17]010200" echo testing DataBar Expanded Stacked Composite with CC-A -zint -o bar139.png -b 139 --height=150 --border=10 --mode=1 --primary="[01]00012345678905[10]ABCDEF" -d "[21]12345678" -zint -o bar139.eps -b 139 --height=150 --border=10 --mode=1 --primary="[01]00012345678905[10]ABCDEF" -d "[21]12345678" -zint -o bar139.svg -b 139 --height=150 --border=10 --mode=1 --primary="[01]00012345678905[10]ABCDEF" -d "[21]12345678" +./zint -o bar139.txt -b 139 --mode=1 --primary="[01]00012345678905[10]ABCDEF" -d "[21]12345678" +./zint -o bar139.gif -b 139 --height=150 --border=10 --mode=1 --primary="[01]00012345678905[10]ABCDEF" -d "[21]12345678" +./zint -o bar139.svg -b 139 --height=150 --border=10 --mode=1 --primary="[01]00012345678905[10]ABCDEF" -d "[21]12345678" echo testing Channel Code -zint -o bar140.png -b 140 --height=100 --border=10 -d "12345" -zint -o bar140.eps -b 140 --height=100 --border=10 -d "12345" -zint -o bar140.svg -b 140 --height=100 --border=10 -d "12345" +./zint -o bar140.txt -b 140 -d "12345" +./zint -o bar140.gif -b 140 --height=100 --border=10 -d "12345" +./zint -o bar140.svg -b 140 --height=100 --border=10 -d "12345" echo testing Code One -zint -o bar141.png -b 141 --border=10 -d "Demonstration Code One symbol generated by libzint" -zint -o bar141.eps -b 141 --border=10 -d "Demonstration Code One symbol generated by libzint" -zint -o bar141.svg -b 141 --border=10 -d "Demonstration Code One symbol generated by libzint" +./zint -o bar141.txt -b 141 -d "Demonstration Code One symbol generated by libzint" +./zint -o bar141.gif -b 141 --border=10 -d "Demonstration Code One symbol generated by libzint" +./zint -o bar141.svg -b 141 --border=10 -d "Demonstration Code One symbol generated by libzint" echo testing Grid Matrix -zint -o bar142.png -b 142 --border=10 -d "Demonstration Grid Matrix generated by libzint" -zint -o bar142.eps -b 142 --border=10 -d "Demonstration Grid Matrix generated by libzint" -zint -o bar142.svg -b 142 --border=10 -d "Demonstration Grid Matrix generated by libzint" -echo testing PNG rotation -zint -o barrot0.png -b 130 --height=50 --border=10 --mode=1 --rotate=0 --primary=331234567890+01234 -d "[99]1234-abcd" -zint -o barrot90.png -b 130 --height=50 --border=10 --mode=1 --rotate=90 --primary=331234567890+01234 -d "[99]1234-abcd" -zint -o barrot180.png -b 130 --height=50 --border=10 --mode=1 --rotate=180 --primary=331234567890+01234 -d "[99]1234-abcd" -zint -o barrot270.png -b 130 --height=50 --border=10 --mode=1 --rotate=270 --primary=331234567890+01234 -d "[99]1234-abcd" +./zint -o bar142.txt -b 142 -d "Demonstration Grid Matrix generated by libzint" +./zint -o bar142.gif -b 142 --border=10 -d "Demonstration Grid Matrix generated by libzint" +./zint -o bar142.svg -b 142 --border=10 -d "Demonstration Grid Matrix generated by libzint" +echo testing output formats +./zint -o barout.png -b 58 --border=10 -d "Sample output QR Code" +./zint -o barout.gif -b 58 --border=10 -d "Sample output QR Code" +./zint -o barout.bmp -b 58 --border=10 -d "Sample output QR Code" +./zint -o barout.pcx -b 58 --border=10 -d "Sample output QR Code" +./zint -o barout.eps -b 58 --border=10 -d "Sample output QR Code" +./zint -o barout.svg -b 58 --border=10 -d "Sample output QR Code" +echo testing image rotation +./zint -o barrot0.gif -b 130 --height=50 --border=10 --mode=1 --rotate=0 --primary=331234567890+01234 -d "[99]1234-abcd" +./zint -o barrot90.gif -b 130 --height=50 --border=10 --mode=1 --rotate=90 --primary=331234567890+01234 -d "[99]1234-abcd" +./zint -o barrot180.gif -b 130 --height=50 --border=10 --mode=1 --rotate=180 --primary=331234567890+01234 -d "[99]1234-abcd" +./zint -o barrot270.gif -b 130 --height=50 --border=10 --mode=1 --rotate=270 --primary=331234567890+01234 -d "[99]1234-abcd" echo testing Extended ASCII support -zint -o barext.png --height=50 --border=10 -d "größer" -zint -o barext.svg --height=50 --border=10 -d "größer" +./zint -o barext.txt -d "größer" +./zint -o barext.svg --height=50 --border=10 -d "größer" From 3cf8a142b8ef6a7c2df6384d341fc443e1477a37 Mon Sep 17 00:00:00 2001 From: Robin Stuart Date: Fri, 26 Aug 2016 15:13:40 +0100 Subject: [PATCH 7/7] Bugfix: Ouput binding in raster images Also: tidy up use of output_options --- backend/code49.c | 4 +++- backend/dotcode.c | 14 ++++++++------ backend/library.c | 8 ++++++-- backend/pcx.c | 20 ++++++++++---------- backend/png.c | 2 +- backend/ps.c | 8 ++++---- backend/raster.c | 14 +++++++------- backend/render.c | 6 +++--- backend/svg.c | 16 ++++++++-------- backend_qt4/qzint.cpp | 4 ++-- 10 files changed, 52 insertions(+), 44 deletions(-) diff --git a/backend/code49.c b/backend/code49.c index 64fe280c..9caa0484 100644 --- a/backend/code49.c +++ b/backend/code49.c @@ -329,7 +329,9 @@ int code_49(struct zint_symbol *symbol, unsigned char source[], const int length } symbol->whitespace_width = 10; - symbol->output_options += BARCODE_BIND; + if (!(symbol->output_options & BARCODE_BIND)) { + symbol->output_options += BARCODE_BIND; + } symbol->border_width = 2; return 0; diff --git a/backend/dotcode.c b/backend/dotcode.c index 0f0b29e0..993506ea 100644 --- a/backend/dotcode.c +++ b/backend/dotcode.c @@ -302,7 +302,7 @@ int seventeen_ten(unsigned char source[], int position, int length) { * returning the resulting number of codewords (Annex F.II.E) */ int ahead_c(unsigned char source[], int position, int length) { - int count = 0; + int count = 0; int i; for (i = position; (i < length) && datum_c(source, i, length); i += 2) { @@ -327,7 +327,7 @@ int try_c(unsigned char source[], int position, int length) { /* Annex F.II.G */ int ahead_a(unsigned char source[], int position, int length) { - int count = 0; + int count = 0; int i; for (i = position; ((i < length) && datum_a(source, i, length)) @@ -340,7 +340,7 @@ int ahead_a(unsigned char source[], int position, int length) { /* Annex F.II.H */ int ahead_b(unsigned char source[], int position, int length) { - int count = 0; + int count = 0; int i; for (i = position; ((i < length) && datum_b(source, i, length)) @@ -1050,8 +1050,8 @@ int dotcode(struct zint_symbol *symbol, unsigned char source[], int length) { unsigned char codeword_array[length * 3]; unsigned char masked_codeword_array[length * 3]; #else - char* dot_stream; - char* dot_array; + char* dot_stream; + char* dot_array; unsigned char* codeword_array = (unsigned char *) _alloca(length * 3 * sizeof (unsigned char)); unsigned char* masked_codeword_array = (unsigned char *) _alloca(length * 3 * sizeof (unsigned char)); #endif /* _MSC_VER */ @@ -1249,7 +1249,9 @@ int dotcode(struct zint_symbol *symbol, unsigned char source[], int length) { symbol->row_height[k] = 1; } - symbol->output_options += BARCODE_DOTTY_MODE; + if (!(symbol->output_options & BARCODE_DOTTY_MODE)) { + symbol->output_options += BARCODE_DOTTY_MODE; + } return 0; } \ No newline at end of file diff --git a/backend/library.c b/backend/library.c index d912dd50..a5a1826d 100644 --- a/backend/library.c +++ b/backend/library.c @@ -570,13 +570,17 @@ static int reduced_charset(struct zint_symbol *symbol, const unsigned char *sour if (symbol->symbology == BARCODE_CODE16K) { symbol->whitespace_width = 16; symbol->border_width = 2; - symbol->output_options += BARCODE_BIND; + if (!(symbol->output_options & BARCODE_BIND)) { + symbol->output_options += BARCODE_BIND; + } } if (symbol->symbology == BARCODE_ITF14) { symbol->whitespace_width = 20; symbol->border_width = 8; - symbol->output_options += BARCODE_BOX; + if (!(symbol->output_options & BARCODE_BOX)) { + symbol->output_options += BARCODE_BOX; + } } switch (symbol->input_mode) { diff --git a/backend/pcx.c b/backend/pcx.c index c0c71a95..4525f804 100644 --- a/backend/pcx.c +++ b/backend/pcx.c @@ -35,10 +35,10 @@ #include #include "common.h" #include "pcx.h" /* PCX header structure */ -#include -#ifdef _MSC_VER -#include -#include +#include +#ifdef _MSC_VER +#include +#include #endif #define SSET "0123456789ABCDEF" @@ -49,11 +49,11 @@ int pcx_pixel_plot(struct zint_symbol *symbol, int image_height, int image_width int row, column, i, colour; int run_count; FILE *pcx_file; - pcx_header_t header; -#ifdef _MSC_VER - char* rotated_bitmap; - unsigned char* rle_row; -#endif + pcx_header_t header; +#ifdef _MSC_VER + char* rotated_bitmap; + unsigned char* rle_row; +#endif #ifndef _MSC_VER char rotated_bitmap[image_height * image_width]; @@ -180,7 +180,7 @@ int pcx_pixel_plot(struct zint_symbol *symbol, int image_height, int image_width } /* Open output file in binary mode */ - if ((symbol->output_options & BARCODE_STDOUT) != 0) { + if (symbol->output_options & BARCODE_STDOUT) { #ifdef _MSC_VER if (-1 == _setmode(_fileno(stdout), _O_BINARY)) { strcpy(symbol->errtxt, "Can't open output file"); diff --git a/backend/png.c b/backend/png.c index cb08dcd5..3210baf4 100644 --- a/backend/png.c +++ b/backend/png.c @@ -131,7 +131,7 @@ int png_pixel_plot(struct zint_symbol *symbol, int image_height, int image_width bgblu = (16 * ctoi(symbol->bgcolour[4])) + ctoi(symbol->bgcolour[5]); /* Open output file in binary mode */ - if ((symbol->output_options & BARCODE_STDOUT) != 0) { + if (symbol->output_options & BARCODE_STDOUT) { #ifdef _MSC_VER if (-1 == _setmode(_fileno(stdout), _O_BINARY)) { strcpy(symbol->errtxt, "Can't open output file"); diff --git a/backend/ps.c b/backend/ps.c index add5a9bd..5d06a962 100644 --- a/backend/ps.c +++ b/backend/ps.c @@ -99,7 +99,7 @@ int ps_plot(struct zint_symbol *symbol) { } } - if ((symbol->output_options & BARCODE_STDOUT) != 0) { + if (symbol->output_options & BARCODE_STDOUT) { feps = stdout; } else { feps = fopen(symbol->outfile, "w"); @@ -848,7 +848,7 @@ int ps_plot(struct zint_symbol *symbol) { /* Do nothing! (It's already been done) */ break; default: - if ((symbol->output_options & BARCODE_BIND) != 0) { + if (symbol->output_options & BARCODE_BIND) { if ((symbol->rows > 1) && (is_stackable(symbol->symbology) == 1)) { /* row binding */ fprintf(feps, "TE\n"); @@ -862,7 +862,7 @@ int ps_plot(struct zint_symbol *symbol) { } } } - if (((symbol->output_options & BARCODE_BOX) != 0) || ((symbol->output_options & BARCODE_BIND) != 0)) { + if ((symbol->output_options & BARCODE_BOX) || (symbol->output_options & BARCODE_BIND)) { fprintf(feps, "TE\n"); if ((symbol->output_options & CMYK_COLOUR) == 0) { fprintf(feps, "%.2f %.2f %.2f setrgbcolor\n", red_ink, green_ink, blue_ink); @@ -872,7 +872,7 @@ int ps_plot(struct zint_symbol *symbol) { fprintf(feps, "%.2f %.2f TB %.2f %.2f TR\n", symbol->border_width * scaler, textoffset * scaler, 0.0, (symbol->width + xoffset + xoffset) * scaler); fprintf(feps, "%.2f %.2f TB %.2f %.2f TR\n", symbol->border_width * scaler, (textoffset + symbol->height + symbol->border_width) * scaler, 0.0, (symbol->width + xoffset + xoffset) * scaler); } - if ((symbol->output_options & BARCODE_BOX) != 0) { + if (symbol->output_options & BARCODE_BOX) { /* side bars */ fprintf(feps, "TE\n"); if ((symbol->output_options & CMYK_COLOUR) == 0) { diff --git a/backend/raster.c b/backend/raster.c index d13c1c5a..a5c5719b 100644 --- a/backend/raster.c +++ b/backend/raster.c @@ -292,7 +292,7 @@ int plot_raster_maxicode(struct zint_symbol *symbol, int rotate_angle, int data_ image_height = 300 + (2 * yoffset * 2); if (!(pixelbuf = (char *) malloc(image_width * image_height))) { - printf("Insifficient memory for pixel buffer"); + printf("Insufficient memory for pixel buffer"); return ZINT_ERROR_ENCODING_PROBLEM; } else { for (i = 0; i < (image_width * image_height); i++) { @@ -319,13 +319,13 @@ int plot_raster_maxicode(struct zint_symbol *symbol, int rotate_angle, int data_ } } - if (((symbol->output_options & BARCODE_BOX) != 0) || ((symbol->output_options & BARCODE_BIND) != 0)) { + if ((symbol->output_options & BARCODE_BOX) || (symbol->output_options & BARCODE_BIND)) { /* boundary bars */ draw_bar(pixelbuf, 0, image_width, 0, symbol->border_width * 2, image_width, image_height); draw_bar(pixelbuf, 0, image_width, 300 + (symbol->border_width * 2), symbol->border_width * 2, image_width, image_height); } - if ((symbol->output_options & BARCODE_BOX) != 0) { + if (symbol->output_options & BARCODE_BOX) { /* side bars */ draw_bar(pixelbuf, 0, symbol->border_width * 2, 0, image_height, image_width, image_height); draw_bar(pixelbuf, 300 + ((symbol->border_width + symbol->whitespace_width + symbol->whitespace_width) * 2), symbol->border_width * 2, 0, image_height, image_width, image_height); @@ -619,7 +619,7 @@ int plot_raster_default(struct zint_symbol *symbol, int rotate_angle, int data_t } } - if (((symbol->output_options & BARCODE_BOX) != 0) || ((symbol->output_options & BARCODE_BIND) != 0)) { + if ((symbol->output_options & BARCODE_BOX) || (symbol->output_options & BARCODE_BIND)) { default_text_posn = image_height - 17; } else { default_text_posn = image_height - 17 - symbol->border_width - symbol->border_width; @@ -867,7 +867,7 @@ int plot_raster_default(struct zint_symbol *symbol, int rotate_angle, int data_t xoffset -= comp_offset; /* Put boundary bars or box around symbol */ - if (((symbol->output_options & BARCODE_BOX) != 0) || ((symbol->output_options & BARCODE_BIND) != 0)) { + if ((symbol->output_options & BARCODE_BOX) || (symbol->output_options & BARCODE_BIND)) { /* boundary bars */ draw_bar(pixelbuf, 0, (symbol->width + xoffset + xoffset) * 2, textoffset * 2, symbol->border_width * 2, image_width, image_height); draw_bar(pixelbuf, 0, (symbol->width + xoffset + xoffset) * 2, (textoffset + symbol->height + symbol->border_width) * 2, symbol->border_width * 2, image_width, image_height); @@ -881,7 +881,7 @@ int plot_raster_default(struct zint_symbol *symbol, int rotate_angle, int data_t } } - if ((symbol->output_options & BARCODE_BOX) != 0) { + if (symbol->output_options & BARCODE_BOX) { /* side bars */ draw_bar(pixelbuf, 0, symbol->border_width * 2, textoffset * 2, (symbol->height + (2 * symbol->border_width)) * 2, image_width, image_height); draw_bar(pixelbuf, (symbol->width + xoffset + xoffset - symbol->border_width) * 2, symbol->border_width * 2, textoffset * 2, (symbol->height + (2 * symbol->border_width)) * 2, image_width, image_height); @@ -931,7 +931,7 @@ int plot_raster(struct zint_symbol *symbol, int rotate_angle, int file_type) { } #endif /* NO_PNG */ - if (symbol->output_options &= BARCODE_DOTTY_MODE) { + if (symbol->output_options & BARCODE_DOTTY_MODE) { error = plot_raster_dotty(symbol, rotate_angle, file_type); } else { if (symbol->symbology == BARCODE_MAXICODE) { diff --git a/backend/render.c b/backend/render.c index aa5d7de4..92dcbdb3 100644 --- a/backend/render.c +++ b/backend/render.c @@ -248,7 +248,7 @@ int render_plot(struct zint_symbol *symbol, const float width, const float heigh } large_bar_height = (symbol->height - preset_height) / large_bar_count; - if (((symbol->output_options & BARCODE_BOX) != 0) || ((symbol->output_options & BARCODE_BIND) != 0)) { + if ((symbol->output_options & BARCODE_BOX) || (symbol->output_options & BARCODE_BIND)) { default_text_posn = (symbol->height + text_offset + symbol->border_width + symbol->border_width) * scaler; } else { default_text_posn = (symbol->height + text_offset + symbol->border_width) * scaler; @@ -643,13 +643,13 @@ int render_plot(struct zint_symbol *symbol, const float width, const float heigh } } } - if (((symbol->output_options & BARCODE_BOX) != 0) || ((symbol->output_options & BARCODE_BIND) != 0)) { + if ((symbol->output_options & BARCODE_BOX) || (symbol->output_options & BARCODE_BIND)) { line = render_plot_create_line(0, 0, (symbol->width + xoffset + xoffset) * scaler, symbol->border_width * scaler); render_plot_add_line(symbol, line, &last_line); line = render_plot_create_line(0, (symbol->height + symbol->border_width) * scaler, (symbol->width + xoffset + xoffset) * scaler, symbol->border_width * scaler); render_plot_add_line(symbol, line, &last_line); } - if ((symbol->output_options & BARCODE_BOX) != 0) { + if (symbol->output_options & BARCODE_BOX) { /* side bars */ line = render_plot_create_line(0, 0, symbol->border_width * scaler, (symbol->height + (2 * symbol->border_width)) * scaler); render_plot_add_line(symbol, line, &last_line); diff --git a/backend/svg.c b/backend/svg.c index 0ca80259..64576eb2 100644 --- a/backend/svg.c +++ b/backend/svg.c @@ -95,7 +95,7 @@ int svg_plot(struct zint_symbol *symbol) { } } - if ((symbol->output_options & BARCODE_STDOUT) != 0) { + if (symbol->output_options & BARCODE_STDOUT) { fsvg = stdout; } else { fsvg = fopen(symbol->outfile, "w"); @@ -230,7 +230,7 @@ int svg_plot(struct zint_symbol *symbol) { fprintf(fsvg, " \n", (int)ceil((74.0F + xoffset + xoffset) * scaler), (int)ceil((72.0F + yoffset + yoffset) * scaler), symbol->bgcolour); } - if (((symbol->output_options & BARCODE_BOX) != 0) || ((symbol->output_options & BARCODE_BIND) != 0)) { + if ((symbol->output_options & BARCODE_BOX) || (symbol->output_options & BARCODE_BIND)) { default_text_posn = (symbol->height + textoffset + symbol->border_width + symbol->border_width) * scaler; } else { default_text_posn = (symbol->height + textoffset + symbol->border_width) * scaler; @@ -242,11 +242,11 @@ int svg_plot(struct zint_symbol *symbol) { textoffset = 0.0; - if (((symbol->output_options & BARCODE_BOX) != 0) || ((symbol->output_options & BARCODE_BIND) != 0)) { + if ((symbol->output_options & BARCODE_BOX) || (symbol->output_options & BARCODE_BIND)) { fprintf(fsvg, " \n", 0.0, 0.0, (74.0 + xoffset + xoffset) * scaler, symbol->border_width * scaler); fprintf(fsvg, " \n", 0.0, (72.0 + symbol->border_width) * scaler, (74.0 + xoffset + xoffset) * scaler, symbol->border_width * scaler); } - if ((symbol->output_options & BARCODE_BOX) != 0) { + if (symbol->output_options & BARCODE_BOX) { /* side bars */ fprintf(fsvg, " \n", 0.0, 0.0, symbol->border_width * scaler, (72.0 + (2 * symbol->border_width)) * scaler); fprintf(fsvg, " \n", (74.0 + xoffset + xoffset - symbol->border_width) * scaler, 0.0, symbol->border_width * scaler, (72.0 + (2 * symbol->border_width)) * scaler); @@ -307,7 +307,7 @@ int svg_plot(struct zint_symbol *symbol) { } row_posn += yoffset; - if ((symbol->output_options & BARCODE_DOTTY_MODE) != 0) { + if (symbol->output_options & BARCODE_DOTTY_MODE) { /* Use (currently undocumented) dot mode - see SF ticket #29 */ for (i = 0; i < symbol->width; i++) { if (module_is_set(symbol, this_row, i)) { @@ -609,7 +609,7 @@ int svg_plot(struct zint_symbol *symbol) { /* Do nothing! (It's already been done) */ break; default: - if ((symbol->output_options & BARCODE_BIND) != 0) { + if (symbol->output_options & BARCODE_BIND) { if ((symbol->rows > 1) && (is_stackable(symbol->symbology) == 1)) { /* row binding */ for (r = 1; r < symbol->rows; r++) { @@ -617,11 +617,11 @@ int svg_plot(struct zint_symbol *symbol) { } } } - if (((symbol->output_options & BARCODE_BOX) != 0) || ((symbol->output_options & BARCODE_BIND) != 0)) { + if ((symbol->output_options & BARCODE_BOX) || (symbol->output_options & BARCODE_BIND)) { fprintf(fsvg, " \n", 0.0, 0.0, (symbol->width + xoffset + xoffset) * scaler, symbol->border_width * scaler); fprintf(fsvg, " \n", 0.0, (symbol->height + symbol->border_width) * scaler, (symbol->width + xoffset + xoffset) * scaler, symbol->border_width * scaler); } - if ((symbol->output_options & BARCODE_BOX) != 0) { + if (symbol->output_options & BARCODE_BOX) { /* side bars */ fprintf(fsvg, " \n", 0.0, 0.0, symbol->border_width * scaler, (symbol->height + (2 * symbol->border_width)) * scaler); fprintf(fsvg, " \n", (symbol->width + xoffset + xoffset - symbol->border_width) * scaler, 0.0, symbol->border_width * scaler, (symbol->height + (2 * symbol->border_width)) * scaler); diff --git a/backend_qt4/qzint.cpp b/backend_qt4/qzint.cpp index 93dd956f..eb199fd9 100644 --- a/backend_qt4/qzint.cpp +++ b/backend_qt4/qzint.cpp @@ -331,7 +331,7 @@ namespace Zint { gwidth *= (maxi_width + 1); } - if (m_zintSymbol->output_options &= BARCODE_DOTTY_MODE) { + if (m_zintSymbol->output_options & BARCODE_DOTTY_MODE) { gwidth += 2.0; gheight += 2.0; } @@ -476,7 +476,7 @@ namespace Zint { painter.drawEllipse(QPointF(14.5 * w, 16.5 * w * 0.868), w + w * 1.5, w + w * 1.5); painter.drawEllipse(QPointF(14.5 * w, 16.5 * w * 0.868), w + w * 3, w + w * 3); painter.restore(); - } else if (m_zintSymbol->output_options &= BARCODE_DOTTY_MODE) { + } else if (m_zintSymbol->output_options & BARCODE_DOTTY_MODE) { /* Draw with dots (circles) */ p.setColor(m_fgColor);