Skip to content

Commit

Permalink
implemented version info; added urls regarding patents
Browse files Browse the repository at this point in the history
  • Loading branch information
zdenop committed Jul 2, 2012
1 parent 1e48ef7 commit fdf40be
Show file tree
Hide file tree
Showing 6 changed files with 34 additions and 3 deletions.
1 change: 1 addition & 0 deletions ChangeLog
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down
10 changes: 8 additions & 2 deletions autogen.sh
100644 → 100755
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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
#

Expand Down
7 changes: 6 additions & 1 deletion doc/PATENTS
Original file line number Diff line number Diff line change
@@ -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
7 changes: 7 additions & 0 deletions src/jbig2.cc
Original file line number Diff line number Diff line change
Expand Up @@ -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");
}

Expand Down Expand Up @@ -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];
Expand Down
7 changes: 7 additions & 0 deletions src/jbig2enc.cc
Original file line number Diff line number Diff line change
Expand Up @@ -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
//
Expand Down
5 changes: 5 additions & 0 deletions src/jbig2enc.h
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,11 @@
#include <stdint.h>
#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;
Expand Down

0 comments on commit fdf40be

Please sign in to comment.