Skip to content

Commit

Permalink
Update for version 1.75.0
Browse files Browse the repository at this point in the history
* This is in preparation for a new debian release for Ubuntu 18.04.
  • Loading branch information
DanBloomberg committed Jan 21, 2018
1 parent 58d7265 commit 28dcd63
Show file tree
Hide file tree
Showing 12 changed files with 104 additions and 73 deletions.
4 changes: 2 additions & 2 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -41,8 +41,8 @@ set_property(GLOBAL PROPERTY PREDEFINED_TARGETS_FOLDER "CMake Targets")
project(leptonica C CXX)

set(VERSION_MAJOR 1)
set(VERSION_MINOR 74)
set(VERSION_PATCH 4)
set(VERSION_MINOR 75)
set(VERSION_PATCH 0)
set(VERSION_PLAIN ${VERSION_MAJOR}.${VERSION_MINOR}.${VERSION_PATCH})

option(BUILD_PROG "Build utility programs" OFF)
Expand Down
98 changes: 50 additions & 48 deletions README.html
Original file line number Diff line number Diff line change
Expand Up @@ -75,12 +75,12 @@
- SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*====================================================================*/

README (version 1.74.4)
File update: 26 Sept 2017
README (version 1.75.0)
File update: 24 Jan 2018
---------------------------

gunzip leptonica-1.74.4.tar.gz
tar -xvf leptonica-1.74.4.tar
gunzip leptonica-1.75.0.tar.gz
tar -xvf leptonica-1.75.0.tar

</pre>

Expand Down Expand Up @@ -116,7 +116,7 @@ <h2> <A NAME="BUILDING">
Libraries, executables and prototypes are easily made, as described below.

When you extract from the archive, all files are put in a
subdirectory 'leptonica-1.74.4'. In that directory you will
subdirectory 'leptonica-1.75.0'. In that directory you will
find a src directory containing the source files for the library,
and a prog directory containing source files for various
testing and example programs.
Expand Down Expand Up @@ -200,7 +200,7 @@ <h2> <A NAME="BUILDING">
the external libraries:
Finally, do 'make' in the prog directory.

VERY IMPORTANT: the 240+ programs in the prog directory are
VERY IMPORTANT: the 270+ programs in the prog directory are
an integral part of this package. These can be divided into
four groups:
(1) Programs that are useful applications for running on the
Expand All @@ -210,7 +210,7 @@ <h2> <A NAME="BUILDING">
convertfilestopdf, convertfilestops, convertsegfilestopdf,
convertsegfilestops, printimage and printsplitimage.
(2) Programs that are used as regression tests in alltests_reg.
These are named *_reg, and 66 of them are invoked together
These are named *_reg, and 100 of them are invoked together
(alltests_reg). The regression test framework has been
standardized, and regresstion tests are relatively easy
to write. See regutils.h for details.
Expand Down Expand Up @@ -251,7 +251,7 @@ <h2> <A NAME="BUILDING">
make install

Configure also supports building in a separate directory from the
source. Run "/(path-to)/leptonica-1.74.4/configure" and then "make"
source. Run "/(path-to)/leptonica-1.75.0/configure" and then "make"
from the desired build directory.

Configure has a number of useful options; run "configure --help" for
Expand Down Expand Up @@ -431,19 +431,17 @@ <h2> <A NAME="DEPENDENCIES">
add that path to the LD_LIBRARY_PATH environment variable.

To read and write jpeg2000 files:
(1) Download libopenjp2, version 2.X, from their distribution.
(1) Download libopenjp2, version 2.3, from their distribution.
(2) #define HAVE_LIBJP2K 1 (in environ.h)
(2a) If you have version 2.X, X != 1, edit LIBJP2K_HEADER (in environ.h)
(2a) If you have version 2.X, X != 3, edit LIBJP2K_HEADER (in environ.h)
(3) In prog/makefile, edit ALL_LIBS to include -lopenjp2
(4) The library will be installed into /usr/local/lib.

To read and write gif files:
(1) Download version giflib-5.X.X from souceforge
(1) Download version giflib-5.1.X+ from souceforge
(2) #define HAVE_LIBGIF 1 (in environ.h)
(3) In prog/makefile, edit ALL_LIBS to include -lgif
(4) The library will be installed into /usr/local/lib.
(5) Note: do not use giflib-4.1.4: binary comp and decomp
don't pack the pixel data and are ridiculously slow.
</pre>


Expand Down Expand Up @@ -605,8 +603,8 @@ <h2> <A NAME="CONTENTS">
This is a source for a clean, fast implementation of rasterops.
You can find details starting at the Leptonica home page,
and also by looking directly at the source code.
The low-level code is in roplow.c and ropiplow.c, and an
interface is given in rop.c to the simple Pix image data structure.
Some of the low-level code is in roplow.c, and an interface is
given in rop.c to the simple Pix image data structure.

2. Binary morphology

Expand Down Expand Up @@ -672,7 +670,7 @@ <h2> <A NAME="CONTENTS">
Brick Sels are separable into linear horizontal and vertical elements.
We use the van Herk/Gil-Werman algorithm, that performs the calculations
in a time that is independent of the size of the Sels. Implementations
of tophat and hdome are also given. The low-level code is in graymorphlow.c.
of tophat and hdome are also given.

We also provide grayscale rank order filters for brick filters.
The rank order filter is a generalization of grayscale morphology,
Expand All @@ -690,7 +688,7 @@ <h2> <A NAME="CONTENTS">
- sampling
- lowpass filtering followed by sampling,
- area mapping
- linear interpolation
- linear interpolation

Scaling operations with antialiased sampling, area mapping,
and linear interpolation are limited to 2, 4 and 8 bpp gray,
Expand Down Expand Up @@ -756,16 +754,14 @@ <h2> <A NAME="CONTENTS">
c. Rotation by sampling. This can be used on images of arbitrary
depth, and done about an arbitrary point. Colormaps are retained.

The area mapping rotations are slower and more accurate,
because each new pixel is composed using an average of four
neighboring pixels in the original image; this is sometimes
also called "antialiasing". Very fast color area mapping
rotation is provided. The low-level code is in rotateamlow.c.
The area mapping rotations are slower and more accurate, because each
new pixel is composed using an average of four neighboring pixels
in the original image; this is sometimes also also called "antialiasing".
Very fast color area mapping rotation is provided.

The shear rotations are much faster, and work on images
of arbitrary pixel depth, but they just move pixels
around without doing any averaging. The pixRotateShearIP()
operates on the image in-place.
The shear rotations are much faster, and work on images of arbitrary
pixel depth, but they just move pixels around without doing any averaging.
The pixRotateShearIP() operates on the image in-place.

We also provide orthogonal rotators (90, 180, 270 degree; left-right
flip and top-bottom flip) for arbitrary image depth.
Expand All @@ -789,10 +785,10 @@ <h2> <A NAME="CONTENTS">

7. Image enhancement

A few simple image enhancement routines for grayscale and
color images have been provided. These include intensity mapping
with gamma correction and contrast enhancement, as well as edge
sharpening, smoothing, and hue and saturation modification.
Some simple image enhancement routines for grayscale and color
images have been provided. These include intensity mapping with
gamma correction and contrast enhancement, histogram equalization,
edge sharpening, smoothing, and various color-shifting operations.

8. Convolution and cousins

Expand Down Expand Up @@ -855,21 +851,21 @@ <h2> <A NAME="CONTENTS">
a video compression library. It is rapidly growing in acceptance,
and is supported natively in several browsers. Leptonica provides
an interface through webp into the underlying codec. You need
to download libwebp.
to download libwebp. See webpio.c.

- JP2K (jpeg2000) is a wavelet encoding method, that has clear
- JP2 (jpeg2000) is a wavelet encoding method, that has clear
advantages over jpeg in compression and quality (especially when
the image has sharp edges, such as scanned documents), but is
only slowly growing in acceptance. For it to be widely supported,
it will require support on a major browser (as with webp).
Leptonica provides an interface through openjpeg into the underlying
codec. You need to download libopenjp2, version 2.X.
codec. You need to download libopenjp2, version 2.X. See jp2kio.c.

- GIF is still widely used in the world. With the expiration
of the LZW patent, it is practical to add support for GIF files.
The open source gif library is relatively incomplete and
unsupported (because of the Sperry-Rand-Burroughs-Univac
patent history). See gifio.c.
patent history). Leptonica supports versions 5.1+. See gifio.c.

Here's a summary of compression support and limitations:
- All formats except JPEG, WEBP and JP2K support 1 bpp binary.
Expand All @@ -881,14 +877,14 @@ <h2> <A NAME="CONTENTS">
- PNG, JPEG, TIFF, WEBP, JP2K and GIF support image compression;
PNM and BMP do not.
- WEBP supports rgb color and rgba.
- JP2K supports 8 bpp grayscale, rgb color and rgba.
- JP2 supports 8 bpp grayscale, rgb color and rgba.
Use prog/ioformats_reg for a regression test on all formats, including
thorough testing on TIFF.
For more thorough testing on other formats, use:
- prog/pngio_reg for PNG.
- prog/gifio_reg for GIF
- prog/webpio_reg for WEBP
- prog/jp2kio_reg for JP2K
- prog/jp2kio_reg for JP2

We provide generators for PS output, from all types of input images.
The output can be either uncompressed or compressed with level 2
Expand Down Expand Up @@ -925,13 +921,16 @@ <h2> <A NAME="CONTENTS">
compile time, using the environment variables in environ.h.

For all formatted reads and writes, we support read from memory
and write to memory. (We cheat with gif, using a file intermediary.)
For all formats except for TIFF, these memory I/O functions
are supported through open_memstream() and fmemopen(),
which only is available with the gnu C runtime library (glibc).
Therefore, except for TIFF, you will not be able to do memory
supported read/writes on these platforms:
OSX, Windows, Solaris
and write to memory. The gnu C runtime library (glibc) supports
two I/O functions, open_memstream() and fmemopen(), which read
and write directly to memory as if writing to a file stream.
* On all platforms, leptonica supports direct read/write with memory
for TIFF, PNG, BMP, GIF and WEBP formats.
* On linux, leptonica uses the special gnu libraries to enable
direct read/write with memory for JPEG, PNM and JP2.
* On platforms without the gnu libraries, such as OSX, Windows
and Solaris, read/write with memory for JPEG, PNM and JP2 goes
through temp files.
To enable/disable memory I/O for image read/write, see environ.h.

We also provide fast serialization and deserialization between a pix
Expand Down Expand Up @@ -983,7 +982,9 @@ <h2> <A NAME="CONTENTS">
Byte arrays are implemented both as a wrapper around the actual
array and as a queue. The string arrays are particularly useful
for both parsing and composing text. Generic lists with
doubly-linked cons cells are also provided.
doubly-linked cons cells are also provided. Other data structures
are provided for handling ordered sets and maps, as well as hash sets
and hash maps.

14. Examples of programs that are easily built using the library:

Expand Down Expand Up @@ -1030,7 +1031,7 @@ <h2> <A NAME="CONTENTS">
- a utility that will dewarp images of text that were captured
with a camera at close range.

- a sudoku solver, including a pretty good test for uniqueness
- a sudoku solver and generator, including a good test for uniqueness

- see (13, above) for other document image applications.

Expand Down Expand Up @@ -1063,13 +1064,13 @@ <h2> <A NAME="CONTENTS">
src/makefile.static
CMakeLists.txt
configure.ac
allheaders_top.txt (and consequently allheaders.h)
allheaders_top.txt (and propagated to allheaders.h)
All even versions from 1.42 to 1.60 were originally archived at
http://code.google.com/p/leptonica, as well as all versions after 1.60.
These have now been transferred by Egor Pugin to github:
github.com/danbloomberg/leptonica
where all releases (1.42 - 1.74.4) are available; e.g.,
https://github.com/DanBloomberg/leptonica/releases/tag/1.74.4
where all releases (1.42 - 1.75.0) are available; e.g.,
https://github.com/DanBloomberg/leptonica/releases/tag/1.75.0
Most recent releases from 1.67 are also available at
leptonica.org/download.html
Note that if you are downloading from github, the releases are more
Expand All @@ -1088,6 +1089,7 @@ <h2> <A NAME="CONTENTS">
1.72 : 4.3.0
1.73 : 5.0.0
1.74 : 5.1.0
1.75 : 5.2.0

A brief version chronology is maintained in version-notes.html.
Starting with gcc 4.3.3, error warnings (-Werror) are given for
Expand Down
2 changes: 1 addition & 1 deletion configure.ac
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
AC_PREREQ([2.50])
AC_INIT([leptonica], [1.74.4])
AC_INIT([leptonica], [1.75.0])
AC_CONFIG_AUX_DIR([config])
AC_CONFIG_HEADERS([config_auto.h:config/config.h.in])
AC_CONFIG_SRCDIR([src/adaptmap.c])
Expand Down
7 changes: 2 additions & 5 deletions prog/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -286,11 +286,8 @@ add_prog_target(yuvtest yuvtest.c)

set (INSTALL_PROGS
convertfilestopdf convertfilestops
convertformat
convertsegfilestopdf convertsegfilestops
converttopdf converttops fileinfo
printimage printsplitimage printtiff
splitimage2pdf xtractprotos
convertformat convertsegfilestopdf convertsegfilestops
converttopdf converttops fileinfo xtractprotos
)

foreach(make_install ${INSTALL_PROGS})
Expand Down
12 changes: 4 additions & 8 deletions prog/Makefile.am
Original file line number Diff line number Diff line change
Expand Up @@ -4,11 +4,8 @@ AM_CPPFLAGS = -I$(top_srcdir)/src -I$(top_builddir)/src
LDADD = $(top_builddir)/src/liblept.la $(LIBM)

INSTALL_PROGS = convertfilestopdf convertfilestops \
convertformat \
convertsegfilestopdf convertsegfilestops \
converttopdf converttops fileinfo \
printimage printsplitimage printtiff \
splitimage2pdf xtractprotos
convertformat convertsegfilestopdf convertsegfilestops \
converttopdf converttops fileinfo xtractprotos

AUTO_REG_PROGS = adaptmap_reg affine_reg alphaops_reg \
alphaxform_reg baseline_reg bilateral2_reg \
Expand Down Expand Up @@ -42,7 +39,7 @@ AUTO_REG_PROGS = adaptmap_reg affine_reg alphaops_reg \
selio_reg shear1_reg shear2_reg \
skew_reg splitcomp_reg subpixel_reg \
texturefill_reg threshnorm_reg translate_reg \
warper_reg writetext_reg xformbox_reg
warper_reg wordboxes_reg writetext_reg xformbox_reg

if HAVE_LIBGIF
AUTO_REG_PROGS += gifio_reg
Expand All @@ -67,8 +64,7 @@ MANUAL_REG_PROGS = alltests_reg adaptnorm_reg bilateral1_reg \
pixalloc_reg pixmem_reg pixtile_reg \
ptra1_reg ptra2_reg \
rasterop_reg smallpix_reg \
smoothedge_reg string_reg \
wordboxes_reg
smoothedge_reg string_reg

OTHER_PROGS = adaptmap_dark \
arabic_lines arithtest \
Expand Down
5 changes: 5 additions & 0 deletions prog/makefile.static
Original file line number Diff line number Diff line change
Expand Up @@ -248,6 +248,11 @@ SRC2 = autogen.137.c dwalinear.3.c dwalinearlow.3.c

all: $(SRC:%.c=%)

# Jan 2018 (even smaller set of nine utility programs)
#debian: convertfilestopdf convertfilestops convertformat \
# convertsegfilestopdf convertsegfilestops \
# converttopdf converttops fileinfo xtractprotos

# Jan 2014 (minimal set of utility programs)
#debian: convertfilestopdf convertfilestops convertformat \
# convertsegfilestopdf convertsegfilestops \
Expand Down
2 changes: 1 addition & 1 deletion src/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ string(REPLACE "-O3" "-O2" CMAKE_C_FLAGS_RELEASE ${CMAKE_C_FLAGS_RELEASE})

add_library (leptonica ${LIBRARY_TYPE} ${src} ${hdr})
set_target_properties (leptonica PROPERTIES VERSION ${VERSION_PLAIN})
set_target_properties (leptonica PROPERTIES SOVERSION 5.1.0)
set_target_properties (leptonica PROPERTIES SOVERSION 5.2.0)
if (WIN32)
set_target_properties (leptonica PROPERTIES OUTPUT_NAME leptonica-${VERSION_PLAIN})
set_target_properties (leptonica PROPERTIES DEBUG_OUTPUT_NAME leptonica-${VERSION_PLAIN}d)
Expand Down
2 changes: 1 addition & 1 deletion src/Makefile.am
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ AM_CPPFLAGS = $(ZLIB_CFLAGS) $(LIBPNG_CFLAGS) $(JPEG_CFLAGS) $(LIBTIFF_CFLAGS) $
lib_LTLIBRARIES = liblept.la
liblept_la_LIBADD = $(LIBM) $(ZLIB_LIBS) $(LIBPNG_LIBS) $(JPEG_LIBS) $(GIFLIB_LIBS) $(LIBTIFF_LIBS) $(LIBWEBP_LIBS) $(LIBJP2K_LIBS) $(GDI_LIBS)

liblept_la_LDFLAGS = -no-undefined -version-info 5:1:0
liblept_la_LDFLAGS = -no-undefined -version-info 5:2:0

liblept_la_SOURCES = adaptmap.c affine.c \
affinecompose.c arrayaccess.c \
Expand Down
4 changes: 2 additions & 2 deletions src/allheaders.h
Original file line number Diff line number Diff line change
Expand Up @@ -29,8 +29,8 @@


#define LIBLEPT_MAJOR_VERSION 1
#define LIBLEPT_MINOR_VERSION 74
#define LIBLEPT_PATCH_VERSION 4
#define LIBLEPT_MINOR_VERSION 75
#define LIBLEPT_PATCH_VERSION 0

#include "alltypes.h"

Expand Down
4 changes: 2 additions & 2 deletions src/allheaders_top.txt
Original file line number Diff line number Diff line change
Expand Up @@ -29,8 +29,8 @@


#define LIBLEPT_MAJOR_VERSION 1
#define LIBLEPT_MINOR_VERSION 74
#define LIBLEPT_PATCH_VERSION 4
#define LIBLEPT_MINOR_VERSION 75
#define LIBLEPT_PATCH_VERSION 0

#include "alltypes.h"

Expand Down
4 changes: 2 additions & 2 deletions src/makefile.static
Original file line number Diff line number Diff line change
Expand Up @@ -148,8 +148,8 @@ LIBRARIAN_SHARED = gcc -shared
# Links are created among the files <libname>.X.Y,
# <libname>.X, and <libname>, where Y is the minor revision number.
MAJOR_REV = 1
MINOR_REV = 74
PATCH_REV = 4
MINOR_REV = 75
PATCH_REV = 0

#########################################################

Expand Down
Loading

0 comments on commit 28dcd63

Please sign in to comment.