Palm Database ImageViewer
Dexvertbot (Talk | contribs) m (→Sample files) |
|||
(15 intermediate revisions by 4 users not shown) | |||
Line 4: | Line 4: | ||
|extensions={{ext|pdb}} | |extensions={{ext|pdb}} | ||
}} | }} | ||
− | + | '''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. | |
− | '''Palm Database ImageViewer format''' is a type of [[ | + | |
− | It | + | 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 [[Run-length encoding|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 [[Palm OS Database|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. | ||
+ | |||
+ | {| class="wikitable" | ||
+ | ! Offset !! Type !! Field !! Observed values !! Remarks | ||
+ | |- | ||
+ | |N+0 || char[32] || 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)<br>cmpr_meth: 0=Uncompressed, 1=RLE | ||
+ | |- | ||
+ | |N+33 || byte || type || || 0 = 2 bits/pixel grayscale<br>2 = 4 bits/pixel grayscale<br>other (typically 0xff) = 1 bit/pixel grayscale | ||
+ | |- | ||
+ | |N+34 || byte[4] || reserved || 0 | ||
+ | |- | ||
+ | |N+38 || byte[4] || note || 0 | ||
+ | |- | ||
+ | |N+42 || uint16 || last_x || 0 | ||
+ | |- | ||
+ | |N+44 || uint16 || last_y || 0 | ||
+ | |- | ||
+ | |N+46 || byte[4] || reserved || 0 | ||
+ | |- | ||
+ | |N+50 || uint16 || anchor_x || 0xffff | ||
+ | |- | ||
+ | |N+52 || uint16 || anchor_y || 0xffff | ||
+ | |- | ||
+ | |N+54 || uint16 || width || ||rowspan="2"| The pixel dimensions of the image. | ||
+ | |- | ||
+ | |N+56 || uint16 || height || | ||
+ | |- | ||
+ | |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. | ||
+ | |} | ||
+ | |||
+ | ==== 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: | ||
+ | {| class="wikitable" | ||
+ | ! 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]]. | ||
== Identification == | == Identification == | ||
− | ASCII characters | + | ASCII characters {{magic|vIMGView}} appear at file offset 60. |
== Software == | == Software == | ||
− | * [http://www. | + | * [[ImageMagick]] (format named "PDB") |
+ | * [[Netpbm]] (v10.52+): pdbimgtopam, pamtopdbimg | ||
+ | * [https://sourceforge.net/projects/imgvtopgm/ imgvtopgm/imgvtopnm] | ||
+ | * [[XnView]] | ||
+ | * [[Tom's Viewer]] | ||
+ | |||
+ | == Sample files == | ||
+ | * http://cd.textfiles.com/pdasoftware/PILOT/ ... | ||
+ | ** E.g. [http://cd.textfiles.com/pdasoftware/PILOT/TRAVEL/ TRAVEL/], [http://cd.textfiles.com/pdasoftware/PILOT/INFO/ELECTRON/ ELECTRON/] | ||
+ | * [https://sourceforge.net/projects/imgvtopgm/ imgvtopgm-2.0.tar.gz] → samples/*.pdb | ||
+ | * [http://www.memoware.com/ MemoWare] → [http://www.memoware.com/?screen=advanced_search Advanced search] → Search for "FireViewer" or "TinyViewer" format | ||
+ | * {{DexvertSamples|image/palmDatabase}} | ||
+ | |||
+ | [[Category:Palm]] | ||
+ | [[Category:Palm OS Database]] |
Latest revision as of 04:22, 28 December 2023
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.
Contents |
[edit] 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.
[edit] 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.
[edit] 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.
Offset | Type | Field | Observed values | Remarks |
---|---|---|---|---|
N+0 | char[32] | 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+34 | byte[4] | reserved | 0 | |
N+38 | byte[4] | note | 0 | |
N+42 | uint16 | last_x | 0 | |
N+44 | uint16 | last_y | 0 | |
N+46 | byte[4] | reserved | 0 | |
N+50 | uint16 | anchor_x | 0xffff | |
N+52 | uint16 | anchor_y | 0xffff | |
N+54 | uint16 | width | The pixel dimensions of the image. | |
N+56 | uint16 | height | ||
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. |
[edit] 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:
Code byte (N) | Instructions |
---|---|
N ≤ 128 | Emit the next N+1 bytes literally. |
N ≥ 129 | Emit the next byte N−127 times. |
[edit] Comment record data segment
The comment data apparently consists entirely of the comment text, presumably using the Palm OS character set.
[edit] Identification
ASCII characters vIMGView
appear at file offset 60.
[edit] Software
- ImageMagick (format named "PDB")
- Netpbm (v10.52+): pdbimgtopam, pamtopdbimg
- imgvtopgm/imgvtopnm
- XnView
- Tom's Viewer
[edit] Sample files
- http://cd.textfiles.com/pdasoftware/PILOT/ ...
- imgvtopgm-2.0.tar.gz → samples/*.pdb
- MemoWare → Advanced search → Search for "FireViewer" or "TinyViewer" format
- dexvert samples — image/palmDatabase