Section: File Formats (5)
Return to Main Contents
gpsras - graphics processing system raster file format
file format is a very simple bitmap image format, historically used by
the now-obsolete Graphics Processing System on some legacy UNIX systems.
Because of its simplicity, and the prior availability of utilities to
manage files of this format, it was adopted as an image format for the
SCRC analysis software.
The gpsras image files consist of a single, variable length line of
ASCII text, terminated by a newline character, which is the image file
header, followed by a stream of bytes of image data.
GPSRAS Header Format
gpsras bpp ncol nrow
text string in the header is followed by these three numbers:
indicates the number of bits per pixel.
Valid values are 1, 2, 4 and 8.
The only commonly used value in this suite of software is 1,
used for black and white bitmap images.
indicates the number of columns of data per row, i.e. the number of bytes
The number of pixels per row is the product of
As such, for a 1 bit per pixels black and white bitmap, the number of
pixels per row must always be a multiple of 8.
indicates the number of rows of pixels in the image.
text string and the three numbers above are followed by a newline character
which indicates the end of the header bytes.
GPSRAS Body Format
The header is followed by a stream of binary data which traces the image
from left to right, and from top to bottom.
The bytes are in row-major order, i.e. all the bytes of the first (top)
row appear together, followed by the bytes of the second row, and so on.
In the case where there are less than 8 bits per pixel, the most significant
bits in the byte represent the leftmost pixels.
In the common case of 1 bit per pixel, 1 will usually represent a pixel that
is on or painted, and 0 is off or background.
Historically, on older displays where white pixels were drawn on a black
background, it meant that 0 was black and 1 was white.
More commonly today, dark pixels are drawn on a white background, so the
image in 1 bit per pixels gpsras format files are actually the inverse,
where 1 usually means a black pixel, and 0 is white.
When 2, 4 or 8 bits per pixels are used, the values at each pixel
will usually represent shades of gray, with 0 being black and all ones
As there is no colour map, and no more than 8 bits per pixel, gpsras is not
really suited to colour images.
sdump(1), ras2xbm(1), emuhpgl(1)
- GPSRAS Header Format
- GPSRAS Body Format
- SEE ALSO
This document was created by
using the manual pages.
Time: 20:21:27 GMT, November 21, 2017
Copyright © G. R. Detillieux,
Spinal Cord Research Centre,
The University of Manitoba.