7

Is there something about the technology and rights to the DjVu ebook format that explains why it's only available for iPhone by purchasing an app or by making an in-app purchase in a free app?

I saw somewhere that DjVu depends on the use of certain patents. Does that have something to do with it? Because on the other hand, the DjVuLibre software is offered as free open-source software under the GNU Public License.

I would guess that the rest of the software that a developer needs in order to create a free DjVu app for iPhone is present in ComicFlow, another item of free open-source software under the GNU Public License.

  • 1
    I'm not totally sure on the reason so I am just going to take a guess. In order to have your app on the app store you need to pay $99 per year. Usually, free apps cover this by ads so my guess is that the developers of DjVu don't want to put ads in their app, thus resulting in it being a paid app. – aman207 Dec 23 '13 at 0:44
9

In my opinion the relative inaccessibility of DjVu's libdjvu, including having their own bytestream compression contributed to the low acceptance of the DjVu format over the years and not patent issues. This hinders other software developers adapting their software to support DjVu and even more so when porting to a new platform.


The DjVuLibre software has several characteristics that make it difficult to port. It is C++ based code that builds on a framework that seems to be generically usable, but is probably DjVuLibre specific. I conclude that on not having encountered the framework anywhere else, as well as specific names of classes, etc. that include the substring DJVU) in the framework. That framework, in the form of libdjvu, is however used in all of the DjVuLibre tools (bzz. djvu...)

The libdjvu being a C++ library makes it less portable and less accessible for being called from other languages (e.g. Python), than a C based library.

To complicate things, the bytestreams in the DjVu file format are compressed using a Burrows Wheeler encoder. The encoder is similar to bzip2 but has its own, DjVu specific, implementation. This gives a small advantage over more standard compression schemes, but this is dwarfed by the conceptual better handling of compression of the images through the use of wavelet encoding and individually compressed layers.

I analysed the DjVuLibre software some time ago, to extract OCR-ed text. I settled for a minimal Python implementation for that piece, as I could not get a Python program to hook up to the C++ libraries in a reasonable amount of time. I spent a few days getting the Python implementation to work, analysing the intransparent program flow of the library, all the while comparing the output with results from djvutxt and bzz. This resulted in the DJVU OCR extraction program included in Calibre. (The difficulties might be based on my lack of programming experience: I have been programming C++ since the late 80's—one of the first commercial things I developed in C++ was a library for creating GIF files in 1987—and have used Python since the mid 90's).

I must say I really like the DjVu concepts, and love the superior quality/filesize ratio, compared to scans in other file formats I have used. I always scan to .DjVu. But although I primarily work on a Linux system, the scanning/conversion process includes commercial software running on a Windows box that gives me even better compression results than the open DjVuLibre library does (as well as OCR without an additional program).

1

As for patents, it seems they should expire soon.

As for tools, the compression ratio depends havily on the quality of foreground/background separation. My experience confirms that the commercial software is usually better in this respect.

I should note however that Jakub Wilk's didjvu allows to select one of several foreground/background separation algorithms. So at least in theory it allows to obtain a better compression than with the DjVuLibre tools.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.