============================================================================
              Binary Tree Predictive Coding (BTPC), Version 4.1
============================================================================

What is BTPC?
=============

BTPC is a general-purpose image coding method for lossless or lossy 
compression of photographs and graphics. It is well suited for coding 
multimedia images which combine text, graphics and photographs, and 
is also appropriate as a general-purpose method when the image type
is not known in advance. 

As a lossy compressor, BTPC is slightly superior to JPEG for photographic 
images and much superior for graphics.  Visually-transparent coding of 
color graphics is usually possible at the rate used by GIF. Against a 
state-of-the-art lossy scheme (Said and Pearlman's modified zerotree 
coder), it is inferior for photographs but superior for graphics, mixed 
and multimedia images.  Moreover (see below), BTPC is much faster.

When applied losslessly, BTPC has good performance on both natural images
and graphics.  Against a state-of-the-art lossless scheme (Wu's CALIC), it 
is usually inferior for photographs and about the same for graphics. Again,
BTPC is much faster.

BTPC uses a binary pyramid, predictive coding and Huffman coding. No part of
it is covered by patents.  C++ source code is available and may be freely used. 
BTPC is inherently progressive, and a straightforward modification of the 
decoder to write directly to an on-screen picture buffer allows simple, 
progressive, image recovery.

Where to find it
================

BTPC is documented in:
  J A Robinson, "Efficient General-Purpose Image Compression with Binary Tree
  Predictive Coding", IEEE Transactions on Image Processing, Vol 6, No 4,
  April 1997, pp 601-607.
and, in more detail, at
  http://www.elec.york.ac.uk/visual/jar11/btpc/btpc.html

Patents and Copyright
=====================

The BTPC method is patent-free. In particular, no use is made of arithmetic
coding. The source code is copyright (c) 1994, 1995, 1997 John A. Robinson, 
except for portions of the file colmap.C which are the work of the Independent 
JPEG group and therefore copyright (C) 1991, 1992, 1993, 1994, 1995 
Thomas G. Lane. 

You may freely use all the BTPC code on exactly the same terms as the 
Independent JPEG group allows use of their code. Following their pattern, and
adapting their README file (see READMEJ for the original), here is how it works:

I welcome the use of this software as a component of commercial products.
No royalty is required, but I do ask for an acknowledgement in product
documentation, as described below.

In plain English:

1. I don't promise that this software works.  (But if you find any bugs,
   please let me know!)
2. You can use this software for whatever you want.  You don't have to pay me.
3. You may not pretend that you wrote this software.  If you use it in a
   program, you must acknowledge somewhere in your documentation that
   you've used the BTPC Version 4 code.

In legalese:

The author makes NO WARRANTY or representation, either express or implied,
with respect to this software, its quality, accuracy, merchantability, or
fitness for a particular purpose.  This software is provided "AS IS", and you,
its user, assume the entire risk as to its quality and accuracy.

This software, excluding the file colmap.C, is 
copyright (C) 1994, 1995, 1997 John A. Robinson,
All Rights Reserved except as specified below.

Permission is hereby granted to use, copy, modify, and distribute this
software (or portions thereof) for any purpose, without fee, subject to these
conditions:
(1) If any part of the source code for this software is distributed, then this
"Patents and Copyright" section of the README file must be included, with 
this copyright and no-warranty notice unaltered; and any additions, deletions, 
or changes to the original files must be clearly indicated in accompanying 
documentation.
(2) If only executable code is distributed, then the accompanying
documentation must state that "this software is based in part on Binary Tree
Predictive Coding Version 4, implemented by J. A. Robinson".
(3) Permission for use of this software is granted only if the user accepts
full responsibility for any undesirable consequences; the author accepts
NO LIABILITY for damages of any kind.

