p4pApp (1.1 - July 03) Documentation

User's Page

Synopsis: The application p4pApp has the usual Microsoft Windows Document/View structure and look with a toolbar. Because the input file is treated as read-only several of the menu items of Document/View have been removed. When a file is opened it is displayed on the window and the user may select one of several operations to apply on the file. The result is displayed next to the original. There is a special toolbar button for saving the resulting image. The application can read and write only PNG files. Non trivial changes from version 1.0 are marked in blue.

Purpose: To evaluate the effects of the pack4png algorithm both in the quality of an image and in the space savings. When an image is first read or after the reset button (see Toolbar below) has been pressed the processed image is displayed next to the original. Otherwise the last two processed images are displayed size by side. In all case the required space is also displayed.

The Menus: There are only two of them File and Help. The former has entries for Open, Exit and up to 8 most recently used files (MRUs). The latter has three entries: About p4pApp, Documentation, and Locations. Selecting Documentation causes the default browser to display this document. Selecting Locations displays the directories used by the program.

The Toolbar: There are 16 toolbar buttons with icons as shown below.

Starting from the left they have the following functionality.

  • Open file has the usual Microsoft Windows functionality. The selected PNG image is displayed on the window with its top left corner near the top left corner of the window. In addition, the image dimensions and size as well as the value of D are displayed. A colored circle (green, yellow, or red) is also displayed next to the value of D providing a hint on whether PNG (or GIF) is preferable to JPEG or not. The diameter of the circle suggests whether packing will be helpful.
  • Button labeled "SZ" (for Split Zones): This is a push button. When set, zones of sparse intensities are split and their intensities are assigned to the adjacent strong zones. This increases compression at the expense of introducing aliasing.
  • Buttons labeled "1" through "5" cause pack4png to be invoked with the value of the compression argument equal to the label of the button. The resulting image is displayed to the right or (if it is very wide) below the input image. However the next time one of these button is pressed the previously processed image is displayed in the place of the input image. In this way the user can compare the effects of two different parameter selections. (See also the description of the "Rs" button below.) The display also includes the size of the image and the root mean square error.
  • Button labeled with a red "?": It causes a text dialogue to pop up where the user can type any value to be used for the compression argument in the call of pack4png(). The rest of the operation is the same as for the numbered buttons.
  • Button labeled "1" overlayed to "GcT" transforms the image using compression 1 but with provisions to optimize its encoding for a 6x6x6 global color table (used in some GIF implementations as a "web-safe" palette). Since this applications does not use palettes (or color tables) the file is saved in true color PNG format and some other application must be used to convert it to a paletted format..
  • Button labeled "Q" creates a Quantized version of the input image by displaying only the n most signigicant bits. The image is displayed to the right or (if it is very wide) below the input image. The initial value of n is 3. However, if pack4png() has been called previously, the value of n is chosen to mtach as close as possible the number of zones found.
  • Button labeled "EQ" (for Equalized Quantization) creates a Quantized version by using histogram equalization. The number of zones equals the number found by the most recent call of pack4png(). If no such call has been made, 8 zones are used.
  • Button labeled "Rs" (for Reset or Restore) causes the display of the input image only so that it can be compared with the processed image produced next.
  • Button labeled "S" (for Save) saves in PNG format the last processed image. Its functionality is similar to that of the "Save As" button in Micorsoft Windows applications.
  • Button labeled "W" (for Web): A Web page is created and displayed immediately. The directory where such pages are saved can be found from the Locations menu item. Such a web page is probably the best place to view the effect of the parameters selected. It displays the original plus 8 other versions.
  • Button labeled "ALL": It allows the user to go through all the images in a directory sequentially. If no image has been read the directory is the default image directory (it can be found from the Locations menu item.) If an image, say x001.png, has been read by some other command, then the ALL command examines the directory of that image starting with x001.png. Each imageis displayed together with its transformation using compression 1. After the user clicks on the "YES" button of a dialogue box the next image is displayed.
  • Button labeled with a yellow "?" has the usual Microsoft Windows functionality.

Remarks: In order to keep the program simple there are no printing options.