This is my Java implementation of the EZW image codec according to Shapiro's paper:

Git repository: https://github.com/carueda/ezw.

To compile the package, just type:


which assumes you have the Apache Ant tool.

To run a complete encode/decode test:

cd work/
make image=al.pgm filter=haar

this will encode an image using the program is.ezw.SAQ and then the encoded bit stream will be decoded and displayed progressively using the program is.ezw.ProgressiveViewer. If you don't have a unix-like environment, just have a look at the Makefile to see how you can call the java programs directly.

Included images:

  • al.pgm 256×256
  • lena.jpg 512×512
  • ingrid.raw 256×256
  • uam.jpg 256×256

Any image that java can read can be used; the only requirement is that it be square with side length a power of 2. If the image is in color, its green component is used for all processing.

These filters are implemented:

  • haar
  • daub4
  • daub12

See the Makefile for other parameters.

Note: this was mainly a personal learning exercise. I put some effort for a clear design but couldn't find the time to properly comment the source code. Anyway, hope you find the code and the demo program useful.