JPEG2000 README for ziproxy (CVS)

Juraj Variny<variny@naex.sk>

 Why?

Some people convinced me to support compression of images to 
JPEG2000 (shortly: JP2) because of higher compression ratio than 
classical JPEG. I don't proved it fully true, I can only say that 
while compression to same file size, image distortion of JP2 is less 
annoying than that of classical JPEG. (If you know I'm wrong and it 
is not the case, let me know why.) But I decided to give it a try 
from these reasons:

* alpha (transparent) channel support. When compressing to classical 
  JPEG, transparency info is lost and some pages look then very ugly.

* ability to compute outgoing file size. File size can be easily 
  computed from width, height, quality and number of colors, before 
  doing actual conversion.

 How?

Basically, get Jasper library. Its homepage:

[http://www.ece.uvic.ca/~mdadams/jasper/||http://www.ece.uvic.ca/~mdadams/jasper/]

Download:

[http://www.ece.uvic.ca/~mdadams/jasper/software/jasper-1.700.2.zip||http://www.ece.uvic.ca/~mdadams/jasper/software/jasper-1.700.2.zip]

Set up JP2 mode with:

./configure --with-jasper 

Then compile and use ziproxy as usual.

 JP2Rate option

This option has similar meaning for JP2's than ImageQuality for 
classical JPEGs. It is passed to JP2 coder as "rate" option. 
Determines how many times should be outcoming JP2 file smaller than 
uncompressed bitmap. The formula is:

filesize = width*height*JP2Rate*bytes_per_pixel

where width and height are measured in pixels, and bytes_per_pixel 
is 3 for color images (RGB), 1 for grayscale and +1 for alpha 
channel. Thus by setting one of JP2Rate values you can determine 
compression rate being from 0.0 to 1.0. The default values are:

JP2Rate={0.04,0.04,0.04,0.04}

Value of 0.0 means "don't compress any images" and value of 1.0 
means lossless compression into JP2 (seldom useful).

 ModifySuffixes option

When it is set to "false", behaves as expected -- all images are 
converted to JP2. When is it set to TRUE, HTML modification is used. 
This must be used when browser does not support JP2s natively, only 
with JP2 plugins. Default value is true. Images that plugin can 
handle, are converted to JP2, others to JPEG. 
