PrintPartner

From Just Solve the File Format Problem
Revision as of 14:45, 10 July 2018 by Jsummers (Talk | contribs)

(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to: navigation, search
File Format
Name PrintPartner
Ontology
Extension(s) .gph
Released 1990

PrintPartner is a desktop publishing program for MS-DOS. It was developed by Acropolis Software, and released mainly as freeware. It has a native .GPH graphics format.

Contents

GPH format details

This information is based on reverse engineering and guesswork. It may not be correct.

File:

Field name Type Details
ID/comments char[] ASCII text
ID terminator byte = 0x1a
image_sequence Image[] See below

Image:

Field name Type Details
name_len byte Expected to be from 1 to 20.
name char[20] ASCII text, padded with spaces
cmpr_type byte 1=uncompressed, 2="RLE8", 3="RLE4"
height byte Image height in pixels
rowbytes byte width = rowbytes×8. The width is always a multiple of 8 pixels. Unused columns are expected to have all-white pixels.
image_data byte[] The size of this element must be calculated, in order to locate the next image. The way to do that depends on cmpr_type (see below).

Uncompressed format

1 bit per pixel, white is 0. There is no header, or row padding. The size of the image_data element is height×rowbytes bytes.

RLE8 format

This is a byte-oriented compression scheme. It has a 2-byte header containing the number of compressed bytes. Add 2 to this value to get the size in bytes of the image_data element. After decompression, the data is in the "uncompressed" format described above.

Code byte (N) Instructions
N ≤ 127 Emit the next N bytes literally.
N ≥ 128 Emit the next byte N−128 times.

RLE4 format

This is a pixel-oriented compression scheme. There is a 2-byte header containing the number of 4-bit "nibbles". Each nibble encodes a run of white or black pixels. To calculate the size of the image_data element, divide the number of nibbles by 2, rounding up, and add 2.

Start with an all-white canvas.

Code nibble (N) Instructions
N ≤ 7 Leave the next N pixels white.
N ≥ 8 Make the next N−8 pixels black.

Identification

GPH files apparently start with some ASCII text that begins "PrintPartner Art".

Software

Sample files

Personal tools
Namespaces

Variants
Actions
Navigation
Toolbox