|

Basic
Facts About DjVu
Q: What
is DjVu?
A: DjVu
is an image compression technology specifically designed for scanned document
pages such as books, magazines,catalogs, newspaper articles, technical
publications, ancient and historical documents.
Q: How
can I view DjVu documents?
A: You
need to download the free DjVu plug-in for Netscape Navigator (3.0 and
above) or Microsoft Internet Explorer (3.0 and above).from the AT&T
DjVu web site http://www.djvu.com.
Q: How
should I pronounce DjVu?
A: DjVu
is pronounced like the French "déjà vu" (deh zha vu),
which literally means "already seen". DjVu can bring to cyberspace all the
documents that are "déjà vu" in the real world. The DjVu
technology is anything but "déjà vu".
Q: Who
invented DjVu?
A: DjVu
was originally developed by a group of researchers at AT&T Labs - Research: Yann LeCun, Leon Bottou, Patrick Haffner, and Paul Howard, with help
from other researchers and a development team.
AT&T
Labs is the R&D branch of AT&T.
It is the new name of the piece of Bell Laboratories that remained with
AT&T when Lucent Technologies and NCR were spun off at the end of 1995.

Questions
About DjVu Plug-in
Q: How
big is the plug-in?
A: The
distribution for Win95/98/NT/2000 is less than 500KB. The plug-in can be downloaded and
installed with a few mouse-clicks in a few minutes.
Q: For
what platforms is the plug-in available?
A: Officially
supported versions of the plug-in are available for Linux/Intel, Win95, Win98, WinNT, Win2000,
and MacOS8/ppc. Non-officially supported versions are also available for Solaris2.x, Irix6.x,
and HP/UX. The Linux version is known to work with BSD.
Q: How
big is a DjVu file?
A: A
DjVu file for a typical magazine page at 300 DPI in color is generally
between 30KB and 100KB (about 5 to 10 times smaller than JPEG at the same resolution).
A Black and White page at 300 DPI is generally 5KB to 40KB (about 3 to 8 times smaller
than TIFF/GroupIV).
Q: What
happens when I install the DjVu plug-in for Windows?
A: The
plug-in installation software copies a file called npdjvu.dll
in the "plug-in" folder of your browser. In the same folder, it also copies
a "djvu" folder which contains various help files.
Q: What
is the recommended configuration to view DjVu images under Windows?
A: A
Pentium 90Mhz or faster, 16MB of RAM, a graphic card with 2MB of RAM configured
for 1024x768 resolution (XGA) with at least 65536 colors (16 bits).
Q: What
graphic setting is recommended?
A: 1024x768
resolution (XGA) or better, with 65536 colors (16 bits) or more. This requires
a graphic card with at least 2MB of RAM. The DjVu plug-in will work with
256 colors (8 bits), but it won't look nice, although the plug-in "dithers"
the images to make them look as good as possible.
Q: The plug-in or another program gives me the following error message: "Cannot close chunk when no chunk is open". What is wrong?
A:
You are probably trying to look at a 3.0 DjVu file with a 2.0 plug-in or other 2.0 viewing program. The 2.0
plug-in and DjVuShop give that error message when they attempt to open 3.0 files. The solution for the plug-in is to download the 3.0 plug-in at http://www.djvu.com.

How
To Serve and Link DjVu Files
Q: Which
URL should I use when redirecting users to install the DjVu browser plug-in?
A: We
recommend linking to:
http://www.djvu.com/download.html
Following
this link will automatically install or upgrade the plug-in, and then open
a test page.
Q: Can
I change the URL for the page that is used as the test page during the
DjVu browser plug-in installation?
A: Yes.
You can specify your own URL as an option to our EmbedDjVu script:
http://www.djvu.com/plugins/EmbedDjVu.cgi?<insert DjVu URL here>
DO
NOT use this link for more than one document On your web site, since
this would overload our web server.
Q: When
users access web pages on my web site containing DjVu images, they see
corrupted text instead of the DjVu images. What happened?
A: If
this happens, you probably haven't added the following MIME types
for DjVu to your Web server:
image/x.djvu djvu djv
For users
using the apache web server, you can add your own MIME types for DjVu into
the directory with the DjVu files by creating a file named .htaccess
that contains the following lines:
AddType image/x.djvu djvu djv
For users
using other web servers, you'll probably have to contact your administrator
for help to add the MIME types for DjVu.
Q: I
can't add the MIME types for DjVu to my server, what is the easiest way
to show DjVu files?
A: The
easiest method is create HTML pages that use the < EMBED> tag with WIDTH
and HEIGHT set to 100% as shown below:
<HTML>
<HEAD><TITLE>My DjVu Document</TITLE></HEAD>
<BODY>
<EMBED TYPE="image/x.djvu" SRC="<insert DjVu URL here> " WIDTH=100% HEIGHT=100%>
</EMBED></BODY></HTML>
For example,
if your document was named foo.djvu, you could use:
<HTML>
<HEAD><TITLE>Welcome to foo</TITLE></HEAD>
<BODY>
<EMBED TYPE="image/x.djvu" SRC="foo.djvu" WIDTH=100% HEIGHT=100%>
</EMBED></BODY></HTML>
WARNING:
The
Microsoft Internet Explorer V4.0 web browser does not support the use of
the < EMBED> tag.
Q: What
is the simplest way to embed DjVu images into a web page?
A: The
simplest way to embed a DjVu image is:
<embed type="image/x.djvu" src="<insert DjVu URL here>" width="100%" height="100%">
You can,
of course, use WIDTH and HEIGHT values other than 100%. Lets say
for example you want to fill an area that is just 250 pixels wide by 200
pixels high with a DjVu image foo.djvu, just as you would if the image
was a JPEG image:
<embed type="image/x.djvu" src="foo.djvu" width=250 height=200 passivestretch>
WARNING:
The
Microsoft Internet Explorer V4.0 web browser does not support the use of
the < EMBED> tag, and flags such as passivestretch are not supported
by the Microsoft Internet Explorer V5.0 web browser.
Q: I
want to embed DjVu images into my web pages, in a way that is compatible
with all supported browsers, with an automatic DjVu plug-in installation
method that uses JavaScript. How do I do it?
A: This
method works both with the Netscape and with Microsoft Internet Explorer
web browsers. If you don't want to depend on our web site for DjVu
plug-in installation scripts, copy the TriggerUpdate.js script to your web site:
<SCRIPT LANGUAGE="JavaScript"
SRC="http://www.djvu.com/plugins/TriggerUpdate.js"></SCRIPT>
<SCRIPT LANGUAGE="JAVASCRIPT">
<!--
EmbedDjVu("<insert DjVu URL here>","100%","100%","<insert embed flags here>");
// -->
</SCRIPT>
You are,
of course, free to use WIDTH and HEIGHT values other than 100%.
Let's again consider the DjVu image named foo.djvu displayed as a 250x200
pixel image, just as if it was a JPEG image:
<SCRIPT LANGUAGE="JavaScript"
SRC="http://www.djvu.com/plugins/TriggerUpdate.js"></SCRIPT>
<SCRIPT LANGUAGE="JAVASCRIPT">
<!--
EmbededDjVu("foo.djvu","250","200","passivestretch");
// -->
</SCRIPT>
Note
1: No image will be displayed when JavaScript is disabled in the
browser preferences in this example.
Note
2: This example will also automatically install the DjVu plug-in,
or direct the user to our web site to download the DjVu plug-in.
Note
3: NOTE 3: The lines:
<SCRIPT LANGUAGE="JavaScript"
SRC="http://www.djvu.com/plugins/TriggerUpdate.js"></SCRIPT>
needs
to be included only ONCE per web page.
Q: I
want to embed DjVu images into my web pages, in a way that is compatible
with all supported browsers, with an automatic DjVu plug-in installation
method that does not require the use of JavaScript. How do I do it?
A: Now
we get a bit complicated. If you want your page to work both with
and without JavaScript, the simplest way we've found to do this is shown
below:
<SCRIPT LANGUAGE="JavaScript"
SRC="http://www.djvu.com/plugins/TriggerUpdate.js"></SCRIPT>
<OBJECT classid="clsid:0e8d0700-75df-11d3-8b4a-0008c7450c4a"
WIDTH=100% HEIGHT=100%
BORDER=0 HSPACE=0 VSPACE=0 STYLE="border:0"
CODEBASE="http://www.djvu.com/plugins/DjVuControl.cab#version=2,0,6,1">
<param name="imageURL" value="<insert DjVu URL here>" >
<param name="flags" value="<insert embed flags here>">
<EMBED TYPE="image/x.djvu"
SRC="/plugins/welcome.djvu" HEIGHT="100%" WIDTH="100%"
PLUGINSPAGE="http://www.djvu.com/plugins/SmartUpdate.html?<insert Full DjVu URL here>"
<insert embed flags here>>
</EMBED></OBJECT>
You are,
of course, free to use WIDTH and HEIGHT values other than 100%.
Let's again consider the DjVu image named http://mydomain.com/foo.djvu
displayed as a 250x200 image, just as if it were a JPEG image:
<SCRIPT LANGUAGE="JavaScript"
SRC="http://www.djvu.com/plugins/TriggerUpdate.js"></SCRIPT>
<OBJECT classid="clsid:0e8d0700-75df-11d3-8b4a-0008c7450c4a"
WIDTH=250 HEIGHT=200
BORDER=0 HSPACE=0 VSPACE=0 STYLE="border:0"
CODEBASE="http://www.djvu.com/plugins/DjVuControl.cab#version=2,0,6,1">
<param name="imageURL" value="http://mydomain.com/foo.djvu" >
<param name="flags" value="passivestretch">
<EMBED TYPE="image/x.djvu"
SRC="/plugins/welcome.djvu" HEIGHT="250" WIDTH="200"
PLUGINSPAGE="http://www.djvu.com/plugins/SmartUpdate.html?http://mydomain.com/foo.djvu"
passivestretch>
</EMBED></OBJECT>
Note
1: The Full DjVu URL must contain the complete path to the DjVu
document. Otherwise, users installing the plug-in for the first time
will see errors when displaying the web page.
Note
2: The lines:
<SCRIPT LANGUAGE="JavaScript"
SRC="http://www.djvu.com/plugins/TriggerUpdate.js"></SCRIPT>
needs
to be included only ONCE per web page.
An example of this technique can be seen in our
DjVu Brochure page. The user should note
that the object/embed method, specifying percentages for width and height
and used within HTML table structures, has been known to have unexpected results
in certain browsers. Our example, which is inside a table, uses a percentage
instruction for width and an absolute pixel instruction for height.
Q: I
am skilled at scripting, and I want to write my own EmbedDjVu() type script.
Where are the files I need to use for Active-X and SmartUpdate installation?

Questions
On Configuring Web Browser And Web Server To Display DjVu Properly
Q: Netscape
Unix version displays DjVu documents located on my local disk as garbage
(E.g. file://mydisk/mydirectory/myfile.djvu).
Yet it properly displays
images located on the AT&T web server.
A: This
is a known bug in certain Unix versions of Netscape. You can adjust the
configuration using the following procedure:
Open
your Netscape preferences menu and select APPLICATIONS (under Navigator
options). For each of the following mime types:
image/x.djvu
image/djvu
Do the
following:
-
Select
the mime type so it becomes highlighted.
-
Click
on Edit.
-
Plug
In should be selected, change this to Save To Disk.
-
Change
the option back to Plug In:
-
Click
OK, when asked to use plug-in specifications.
-
Click
OK again.
Q: Netscape
displays DjVu documents located on my web server as garbage (E.g. http://mymachine/mydirectory/myfile.djvu).
Yet it properly displays images located on the AT&T web server.
Q: Netscape
displays all DjVu documents as garbage (E.g. http://www.djvu.com/djvu/att/clips/bw-labs/DigitFrontier1.djvu).
A: This
is a known bug in certain Unix versions of Netscape. Sometimes Netscape
will list all plug-in as having the same Mime types in your plug-in-list.
Especially if you have Real Audio or Real Video installed.
Do
the following:
-
Quit
Netscape
-
Edit
~/.netscape/plugin-list to remove all lines that list nsdejavu.so
-
Restart
Netscape
Q: Why does
the DjVu frame jiggle in Netscape or produce a black line when scrolling the image?
A:
The code specifying the framesets probably has the scrolling attribute set to "yes". Set the scrolling attribute to "auto" or "no" and the problem should be corrected. You can also try turning off the frameborder attribute.
Q: When
I stream DjVu file from a CGI program or other methods of dynamically publishing
DjVu documents, Internet Explorer displays DjVu documents as garbage

Technical
Issues
Q. Where
can I find technical information on DjVu?
Q: Can
DjVu be useful for video or animation?
A: Although
some of DjVu's underlying technologies can be used in video compression, there is
no support for animation or video in DjVu at the moment.
(note
that DjVu can by used for still images extracted from video sequences)
Q: How
much better than GIF or JPEG is DjVu?
A: For
color pages at 300 dpi that contain text and pictures, DjVu files are generally
5 to 8 times smaller than GIF or JPEG for a similar level of subjective
quality. For color pictures that do not contain text DjVu is better than
JPEG, but not enough to justify switching, except for very large images.
Q: How
much better than TIFF and CCITT-G4 is DjVu?
A: CCITT-G4
is a popular compression standard for bilevel (black and white) images.
It is used in Fax machines, and within the TIFF and PDF formats. Black
and White images compressed with DjVu are generally 3 to 8 times smaller
than with CCITT-G4 (TIFF).
Q: How
is DjVu different from PDF?
A: PDF
is primarily designed for documents that are produced electronically, while
DjVu is primarily designed for scanned documents. PDF can be used to compress
scanned documents, but it uses standard compression algorithms such as
JPEG and CCITT G4 produces files that are 4 to 10 times larger than with
DjVu. DjVu can also be used for electronically produced documents, but
it restricts the resolution of those documents.
Q: What's
the main idea behind the DjVu technology?
A: The
main idea is that there are two types of objects on a printed page: characters,
and pictures. The pictures are smooth, do not have too many edges,
and have colors content, while the characters have many hard edges, but
do not have much color and texture content. Those two components should
be separated and compressed with different methods. In DjVu, the backgrounds
and pictures are coded with a Wavelet-based technique called IW44, while
the text and drawings are coded with a new bi-level compression technique
called JB2.
Q: How
can DjVu display these very large images without filling up the memory
of my computer?
A: The
DjVu plug-in uses a unique on-the-fly decompression technology that allows
to keep the images compressed in the memory of the computer and to decompress
only the piece that is being displayed on the screen.
Q: What
new and innovative technologies are used in DjVu?
A: DjVu
uses five pieces of innovative technology from AT&T Labs: the "segmentation"
technique that allows to separate the text from the pictures and backgrounds;
the IW44 wavelet-based continuous-tone image compression technology; the
JB2 bi-level image compression technology; the ZP-coder, a new adaptive
binary arithmetic entropy coder; the IW44 masking technique that saves
bits on the parts of the background that are covered by text; and the on-the-fly
decompression technology that allows the DjVu plug-in to display very large
images on even the most modest PC.
Q: Does
DjVu perform a "lossy" compression or "lossless" compression?
A:DjVu
performs a "lossy" compression. A "lossy" compression means that after
compression, the reconstructed image may be different from the original
image. Like JPEG and most image compression algorithms, DjVu allows the
loss of some high frequency information to achieve high compression rates.
Unlike JPEG, this is not done at the expense of document readability.

Questions
About The DjVu Compression Software and the DjVu SDK
Q: What
gamma correction should I use?
A: Most
scanners and scanning software on PCs will set the gamma of scanned files
to around 1/2 so they look nice on PC displays (which have a gamma of 2.5).
Those files will look a little too light on Mac and SGI which have hardware
gamma correction. It may be better to set the gamma of scanned images to
1/2.2 to get acceptable results on all platforms (Adobe PhotoShop on Windows
does that by default). The remaining differences can be manually corrected
by adjusting the gamma correction in the DjVu plug-in.
For
more information you can visit http://Home.InfoRamp.Net/~poynton/GammaFAQ.html
Q: How
do I report bad quality DjVu images?
A: There
are several ways you can report to us. We would like to have as much information
as possible on the image. So, you can mail djvu@research.att.com
describing the problem and, if possible, include information about the
source image (obtained for instance with TIFFINFO).
Or
if you have a web site to host the problem DjVu image, point us to the
image.
Or
if the DjVu image is less than 50K, you can attach the image along with
your email to us.
Q: How
do I constrain DjVu to code an image as pure background, without downsampling?
(which is useful for photographs
or paintings)
A: You
can use "phototodjvu" which is part of the DjVu compression tools, or "c44", the wavelet
compressor that is provided with the DjVu reference library.
Type "c44 -h" for a list of options. The output wavelet-encoded image is
readable by the DjVu plug-in and its quality is quite a bit better than JPEG
at similar size, particularly at high compression ratios (over 50).
|