This demo application shows what pgf codec is able to do. It takes an 
input image and encodes (-e option) it as a PGF image (extension .pgf). 
A pgf image can be decoded (-d option) and saved in another image format. 

This demo application uses FreeImage for platform independent 
reading of image files. Therefore, FreeImage must be installed on your computer.

Version: 6.19.3

Usage:
- Encoding: pgf -e [-l levels] [-q quality] [-r] [-s] [-v] source dest
               Create from a source file a PGF image (dest).
               The most popular image file formats with the following image
               types are supported:
               - bitmap (1 bit)
               - grayscale (8 and 16 bit)
               - indexed color (8 bit)
               - RGB (16 [565], 24, 32, and 48 bit)
               - RGBA (32 bit)
  Options:
  -l levels    Number of hierarchical levels [1..30]. Default is 0.
               0 means the number of levels are automatically set.
  -q quality   Quality [0..31]. Default is 0.
               0 means perfect quality (lossless compression),
               31 means maximum compression.
  -r           Region of interest (ROI) encoding scheme is used.
               This encoding scheme has a slightly worse compression ratio.
  -s           Level wise encoding in separate writing calls.
  -v           Numbers only: All text output is reduced to numbers.

- Decoding: pgf -d [-rect left top width height] [-s] [-v] source dest
               Create from a PGF image (source) a new image (dest).
  Options:
  -rect rect   Read a rectangular region of a PGF image supporting Region of
               interests (ROI). The rectangle is defined by 4 blank-separated
               positive parameters: left top width height
  -s           Level wise decoding in separate reading calls.
  -v           Numbers only: All text output is reduced to numbers.

- Measuring: pgf -m temp-file [...] source destination
               Measure quality between source and destination bitmap.
               Encode from an input image (source) a PGF image
               (temp-file) and decode from the temp-file a new output
               (destination image).
  Options:
  -mm          Instead of using the option -m temp-file you can use
               the option -mm (without temp-file). The latter writes the PGF
               image into a memory stream instead of a file stream.
               In both cases all encoding and decoding options are valid.