Palm Database ImageViewer

Palm Database ImageViewer format is a type of Palm OS Database file. It contains a bitmap image, and is associated with the Image Viewer III application.

It is also known as FireViewer format, and maybe also TinyViewer format.

It supports at least grayscale images with 2, 4, or 16 gray shades. Images may be uncompressed, or use RLE compression.

Discussion
The ImageViewer format has been decoded fairly completely, but as far as we can tell, no one has ever bothered to write any documentation about it – only source code. Note that it is not a wrapper for Palm bitmap format.

The imgvtopnm software (also called imgvtopgm, apparently) by Eric Howe, released around 1997, is significant. See the README file in that software for information about its origins.

Netpbm's code was derived from Howe's software. ImageMagick also has source code for reading and writing this format.

Format details
''This section is based on guesswork, and source code whose correctness is unverified. It is incomplete, and may be incorrect. It does not necessarily apply if the "version_etc" field is greater than 1. There is evidence that other versions exist that are quite different.''

The file is a PDB file with certain characteristics. In the Palm database header, the type code is "vIMG", and the creator code is "View". There are 1 or 2 records: an "image" record, optionally followed by a "comment" record. The image record has its uniqueID field in the record list set to 0x6f8000. The comment record has uniqueID 0x6f8001.

Image record data segment
The image record's data segment consists of a 58-byte header, followed by the pixel data.

The starting offset N is the 32-bit integer usually found at file offset 78. N is usually 86 or 94.

RLE compression
The compressed data consists of a code byte, followed by one or more data bytes, followed by another code byte, and so on. To decompress:

Comment record data segment
The comment data apparently consists entirely of the comment text, presumably using the Palm OS character set.

Identification
ASCII characters appear at file offset 60.

Software

 * ImageMagick (format named "PDB")
 * Netpbm (v10.52+): pdbimgtopam, pamtopdbimg
 * imgvtopgm/imgvtopnm
 * XnView
 * Tom's Viewer

Sample files

 * http://cd.textfiles.com/pdasoftware/PILOT/ ...
 * E.g. TRAVEL/, ELECTRON/
 * imgvtopgm-2.0.tar.gz → samples/*.pdb
 * MemoWare → Advanced search → Search for "FireViewer" or "TinyViewer" format
 * https://telparia.com/fileFormatSamples/image/palmDatabase/