Updated: Jan 18, 2012

Leptonica has adopted the BSD 2-clause license, a very lightly restricted form of copyright license for source and binary code. The terms are summarized at the top of each source file:

/*====================================================================*
 -  Copyright (C) 2001 Leptonica.  All rights reserved.
 -
 -  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.
 
 -  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 ANY
 -  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.
 *====================================================================*/

A comparison with the GNU open source General Public License (GPL) is instructive. The GPL aggressively promotes open source by requiring that if any modification of open source is used in a commercial product, the source for the entire product must be made open source, along with any modification of the open source code that was imported. This is the reason that Bill Gates has forbidden Microsoft employees from having any contact with open source.

A far less restrictive license would omit the "infection" clause, but still require that any modifications used in products must be made available to the open source community.

The Leptonica copyright is less restrictive still, in that it does not require that modifications of source, which may be used in commercial products, be made available in open source. It is similar to the Apache2 license, but I am using the BSD license because it is short enough to be placed on each source file in its entirety. I had originally modeled the Leptonica copyright after the one used by the developers of PNG, which is similarly unrestrictive but did not specify the conditions for redistribution in binary form.

Kirk McKusic playfully called the original BSD license a a copycenter, to differentiate it from the usual copyright and the GPL copyleft: "Take it down to the copy center and make as many copies as you want." The BSD restrictions can be approximately summarized as: (1) Don't pretend that you wrote this, and (2) Don't sue us if it doesn't work.

Why use a minimally restrictive license? Between NIH ("not invented here") and the learning curve for a large software package like Leptonica, it makes no sense to add any further barriers to the use of this library. Also, as explained elsewhere (e.g., see README.html), I have tried hard to simplify the integration of Leptonica with any other C and C++ packages that you are using.

At present there are nearly 70 different licenses that have been approved by the Open Source Initiative, all of which can be found here. This proliferation of licenses is an indication of both the messiness of copyright law for software, and the fact that we have too many lawyers. GNU has finished their third version of GPL, which is twice as long and four times as complicated as the previous one.


Creative Commons License
Leptonica by Dan Bloomberg is licensed under a Creative Commons Attribution 3.0 United States License.