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.
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.
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.
|N+0||char||name||A name for the image. Same format as the main "database name" field at the beginning of the file, and usually a copy of that field.|
|N+32||byte||version_etc|| cmpr_meth := (version_etc & 0x07)|
cmpr_meth: 0=Uncompressed, 1=RLE
|N+33||byte||type|| 0 = 2 bits/pixel grayscale|
2 = 4 bits/pixel grayscale
other (typically 0xff) = 1 bit/pixel grayscale
|N+54||uint16||width||The pixel dimensions of the image.|
|N+58||bytes||pixel data||After decompression if necessary (see below), pixels are left-to-right, top-to-bottom. Rows are padded to the next byte boundary. A pixel value of 0 is white.|
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:
|Code byte (N)||Instructions|
|N ≤ 128||Emit the next N+1 bytes literally.|
|N ≥ 129||Emit the next byte N−127 times.|
Comment record data segment
The comment data apparently consists entirely of the comment text, presumably using the Palm OS character set.
vIMGView appear at file offset 60.
- ImageMagick (format named "PDB")
- Netpbm (v10.52+): pdbimgtopam, pamtopdbimg