diff --git a/ChangeLog b/ChangeLog index 1b47981..d517444 100644 --- a/ChangeLog +++ b/ChangeLog @@ -3,6 +3,7 @@ * pdf.py now correctly retains DPI from input images (thanks to RubyPDF) * autotools support, VC++ 2008 solution * fix binary file open mode on Windows + * version info (-V --version) 0.27: * Update to the latest Leptonica (1.58) diff --git a/autogen.sh b/autogen.sh old mode 100644 new mode 100755 index 214ac50..fe05e77 --- a/autogen.sh +++ b/autogen.sh @@ -26,6 +26,11 @@ # # All the rest is auto-generated. +# create m4 directory if it not exists +if [ ! -d m4 ]; then + mkdir m4 +fi + bail_out() { echo @@ -39,19 +44,20 @@ bail_out() echo "Running aclocal" aclocal || bail_out +# --- Step 2: echo "Running libtoolize" libtoolize -f -c || glibtoolize -f -c || bail_out libtoolize --automake || glibtoolize --automake || bail_out -# --- Step 2: Generate Makefile.in, +# --- Step 3: Generate Makefile.in, # Using --add-missing --copy makes sure that, if these files are missing, # they are copied from the system so they can be used in a distribution. echo "Running automake --add-missing --copy" automake --add-missing -c > /dev/null || bail_out -# --- Step 3: Generate configure from: +# --- Step 4: Generate configure from: # . configure.ac # diff --git a/doc/PATENTS b/doc/PATENTS index 674c97a..261dcf9 100644 --- a/doc/PATENTS +++ b/doc/PATENTS @@ -1,5 +1,10 @@ This software is a description of processes which may be patented. Use of this software may require patent licenses in some countries. - You are directed to annex I of the JBIG2 specification for information. + +Some information could be found at: + http://www.jpeg.org/jbig/index.html + http://www.cl.cam.ac.uk/~mgk25/jbigkit/patents/ + http://www.jpeg.org/public/fcd14492.pdf + http://itscj.ipsj.or.jp/sc29/open/29view/29n55161.doc diff --git a/src/jbig2.cc b/src/jbig2.cc index b5311f1..f04b523 100644 --- a/src/jbig2.cc +++ b/src/jbig2.cc @@ -54,6 +54,7 @@ usage(const char *argv0) { fprintf(stderr, " -4: upsample 4x before thresholding\n"); fprintf(stderr, " -S: remove images from mixed input and save separately\n"); fprintf(stderr, " -j --jpeg-output: write images from mixed input as JPEG\n"); + fprintf(stderr, " -V --version: version info\n"); fprintf(stderr, " -v: be verbose\n"); } @@ -224,6 +225,12 @@ main(int argc, char **argv) { continue; } + if (strcmp(argv[i], "-V") == 0 || + strcmp(argv[i], "--version") == 0) { + fprintf(stderr, "jbig2enc %s\n", getVersion()); + return 0; + } + if (strcmp(argv[i], "-b") == 0 || strcmp(argv[i], "--basename") == 0) { basename = argv[i+1]; diff --git a/src/jbig2enc.cc b/src/jbig2enc.cc index 0780f8c..13d9124 100644 --- a/src/jbig2enc.cc +++ b/src/jbig2enc.cc @@ -41,6 +41,13 @@ #include "jbig2structs.h" #include "jbig2segments.h" +// ----------------------------------------------------------------------------- +// Returns the version identifier as a static string. +// ----------------------------------------------------------------------------- +char const *getVersion() { + return VERSION; +} + // ----------------------------------------------------------------------------- // Removes spots which are less than size x size pixels // diff --git a/src/jbig2enc.h b/src/jbig2enc.h index 1c0bfff..8c0256c 100644 --- a/src/jbig2enc.h +++ b/src/jbig2enc.h @@ -40,6 +40,11 @@ #include #endif +// ----------------------------------------------------------------------------- +// Returns the version identifier as a static string. +// ------------------------------------------------------------------------- +char const *getVersion(); + struct Pix; // This is the (opaque) structure which handles multi-page compression. struct jbig2ctx;