2007.05.13 17:47 "[Tiff] JBIG2 compressed TIF question about bpp", by t t

2007.05.14 23:05 "Re: [Tiff] Re: JBIG2 in TIFF", by Glenn Widener

Unfortunately, JBIG-KIT is GPL licensed (not even LGPL). This makes it difficult to use in many cases. Some years ago, the JBIG-KIT author expressed concern to me that ImageMagick was using JBIG-KIT and RMS was involved in the discussion. The concern was if ImageMagick was violating GPL by using JBIG-KIT via a loadable module. RMS said that using a loadable module was not sufficient to avoid GPL. The upshot was that ImageMagick was in the clear since it was already observing GPL-required distribution rules.

I have heard that use of JBIG2 is limited by patents.

Not really - there are applicable patents, but they are easily licensed for free. part of JBG2's design was to insure that there would not be patent problems.

Here is the scoop on JBIG2:

The new addendum to TIFF/IT for JBIG2 (and TIFF/IT itself) is available here:

http://www.iso.org/iso/en/CombinedQueryResult.CombinedQueryResult?queryString=tiff.%2Fit

In summer 2006 SwiftView (www.swiftview.com) investigated the new open-source JBIG2 encoding library recently made available by Google. We have found it good enough to incorporate in our latest product release in order to output JBIG2 in PDF, and are enthusistic about the technology's broader potential outside of PDF, especially in TIFF.

We found the code supplied by Google relatively easy to incorporate, although it had some significant bugs and performance issues that we have had to fix.

The JBIG2 encoding code is in two parts. The encoder itself is written in C++. It makes use of a C-based imaging library called Leptonica for most of its tasks.

The Leptonica imaging code is available here:

http://www.leptonica.com/

The JBIG2 encoder code is available here:

http://www.imperialviolet.org/jbig2.html

Most clean (not scanned) text-oriented documents compress 3-10+ times better than CCITT Group 4. The highest compression is obtained on multipage, text-intensive documents. Fidelity is very high; the lossiness is negligible (with some recent algorithmic modifications we have made after extensive testing.) Google's JBIG/2 compression slows our overall conversion times by about 2x; the compression time itself is 4-8 times slower than Group 4.

Portability:

Most of the code is actually in the "Leptonica" image processing library, which is written in GNU C (unfortunately making minor use of a few non-standard GNU C extensions). The JBIG2 encoder layer on top requires a C++ compiler. As our code is compiled under the MS Windows Visual C++ compiler, we have modified the Leptonica and JBIG2 code to compile using Visual C++. It would be quite helpful if the author rewrote the code to allow a straight ANSI-C compilation (it actually makes only minimal use of C++ features).

The library by default requires inclusion of several format I/O libraries, but they are easily stubbed out.

Currently the Leptonica code incurs substantial memory overhead for internal operations. It also consumes a large amount of memory storing extraneous data. We have discovered how to modify the code to reduce this memory usage.

Finally, we have fixed a critical bug in the code to identify matching glyphs which resulted in obscure image errors.

All of these changes have been or are being submitted to the maintainers for inclusion in their code base, and they are doing so, or making equivalent changes.

Patent concerns:

After some stumbling around due to out-of-date links, we had no problem obtaining the required patent licensing from the relevant patent holders, Mitsubishi and IBM.

I faxed requests to the contacts mentioned at:

 www.jpeg.org/jbig/faq.phtml?action=show_answer&question_id=q3f042a7298c94

Mitsubishi replied immediately with a totally reasonable royalty-free license agreement. IBM's fax machine doesn't answer, so I snail-mailed the request, still no response. I then found this web page:

 http://www.ibm.com/ibm/licensing/contact

I got no reply to the online form, but finally got a reply by faxing to:

Attention: Vice President of Intellectual Property and Licensing

IBM
North Castle Drive
Armonk, New York, 10504
FAX: 914-765-4420

After a week or so they emailed to say that we are, in effect, licensed since we asked. They are updating the license terms and said they would get us

actual legal documents in a few weeks. Haven't heard from them yet.