This is a pre-production deployment of Warehouse, however changes made here WILL affect the production instance of PyPI.
Latest Version Dependencies status unknown Test status unknown Test coverage unknown
Project Description

This is a thin ctypes wrapper over the Leptonica library. (http://www.leptonica.org) Almost all functions are exposed to Python, correctly anotated, and data structures used in Leptonica are available as classes from Python.

This Library is licensed under the Lesser GNU Public License Version 3 or Later.

Leptonica data structures are available as authomaticaly generated Python objects, transparently calling Leptonica’s constructors and Detrutors when those exist.

Threfore for a new image object (represented in Leptonica as a “PIX” structure). one just jave to do: image = leptonica.PIX(640, 480,32) This will have the same effect than manually calling the constructor as in:

image = leptonica.functions.pixCreate(640,480,32)

It transposes Leptonica’s extensive inline documentation to Python’s docstrings, so it is possible to check for help and parameter types from the Python interpreter, using pydoc or from an IDE.

However, whenever a function takes pointers or arrays of pointers as parameters, these will have to be created by hand using ctypes facilities before calling the functions. (Except for pointers to Leptonica data structures: these are translated into fairly high-level Python objects).

This is on an already usable stage, although one might expect some API changes and inclusion of more “pure python” utility functions. The main behavior of the Leptonica objetcs should remain the same.

To run it, you might not need to have Leptonica source files: I versioned the generated files as well so that most people just have to copy the .py files around. If you want to hack the code, or generate wrappers for other versions of Leptonica, you have to execute the leptonica_header_parser.py and leptonica_function_parser.py as stand alone programs, after tunning a config.py from the config_remplate.py file.

There are at this time, two utility functions to convert Leptonica images to and from Python Imaging Library (PIL) Images.

Also, although I have not tested this under windows or Mac OS– it probably need some tweaks to run (mostly finding the correct libraries with ctypes) - but otherwise it should plainly work.

Have fun!

js -><-
Release History

Release History

0.8

This version

History Node

TODO: Figure out how to actually get changelog content.

Changelog content for this version goes here.

Donec et mollis dolor. Praesent et diam eget libero egestas mattis sit amet vitae augue. Nam tincidunt congue enim, ut porta lorem lacinia consectetur. Donec ut libero sed arcu vehicula ultricies a non tortor. Lorem ipsum dolor sit amet, consectetur adipiscing elit.

Show More

0.2

History Node

TODO: Figure out how to actually get changelog content.

Changelog content for this version goes here.

Donec et mollis dolor. Praesent et diam eget libero egestas mattis sit amet vitae augue. Nam tincidunt congue enim, ut porta lorem lacinia consectetur. Donec ut libero sed arcu vehicula ultricies a non tortor. Lorem ipsum dolor sit amet, consectetur adipiscing elit.

Show More

Supported By

WebFaction WebFaction Technical Writing Elastic Elastic Search Pingdom Pingdom Monitoring Dyn Dyn DNS HPE HPE Development Sentry Sentry Error Logging CloudAMQP CloudAMQP RabbitMQ Heroku Heroku PaaS Kabu Creative Kabu Creative UX & Design Fastly Fastly CDN DigiCert DigiCert EV Certificate Rackspace Rackspace Cloud Servers DreamHost DreamHost Log Hosting