Category : Printer + Display Graphics
Archive   : VORTEXE.ZIP
Filename : VORT.3

 
Output of file : VORT.3 contained in archive : VORTEXE.ZIP
.TH VORT 3 "5 Dececmber 1990" "VORT 2.0"
.UC 4
.SH NAME
VORT \- A Very Ordinary pixel library for the Very Ordinary Rendering
Tool Kit.
.SH SYNOPSIS
.B #include

.SH DESCRIPTION
.LP
.I VORT (3)
is a library of C routines for manipulating pixel files generated by
the tools in VORT the tool kit.
.SS Functions For The Input/Output Of Images.
.TP
.I openimage(name, flag)
Open image file name according to flag. At the moment flag must be one
of "r" or "w". If name is "-" stdin, or stdout are assumed. At the moment
using "-" (ie. stdin or stdout) is broken. The routine returns NULL in
the event of failure.
.nf

image *
openimage(name, flag)
char *name, *flag;

.fi
.TP
.I readimage(fd)
Reads in an image header from the file fd. If the file is not a VORT
file readimage fails silently and returns NULL, otherwise it returns
the image pointer. If the readimage returns NULL fd will still point
to the same position in the file as before.
.nf

image *
readimage(fd)
int fd;

.fi
.TP
.I closeimage(im)
Close the image file referenced by im. Returns EOF in case of
error.
.nf

int
closeimage(im)
image *im;

.fi
.TP
.I writeheader(im)
Write out the header details of im to the image file pointed to by im.
.nf

writeheader(im)
image *im;

.fi
.TP
.I readmappedline(im, line)
Read in a scanline directly from a colourmapped image file as a string
of indexes. The function returns 0 at end of file. Line is assumed to point
to enough space to contain the scanline.
.nf

int
readmappedline(im, line)
image *im;
unsigned char *line;

.fi
.TP
.I readrgbline(im, red, green, blue)
Read in a scanline worth of the red, green, and blue channels from im. Returns
0 at end of file. Red, green, and blue are assumed to point to enough space
to contain the components of the scan line.
.nf

int
readrgbline(im, red, green, blue)
image *im;
unsigned char *red, *green, *blue;

.fi
.TP
.I readrgbaline(im, red, green, blue, alpha)
Read in a scanline worth of the red, green, blue, and alpha channels from im.
Returns 0 at end of file. Red, green, blue and alpha are assumed to point to
enough space to contain the components of the scan line.
.nf

int
readrgbaline(im, red, green, blue, alpha)
image *im;
unsigned char *red, *green, *blue, *alpha;

.fi
.TP
.I writemappedline(im, line)
Writes a scanline directly to the image file as a string of colourmap
indexes. The function returns 0 in case of error.
.nf

int
writemappedline(im, line)
image *im;
unsigned char *line;

.fi
.TP
.I writergbline(im, red, green, blue)
Write out a scanline worth of red, green, and blue channels to the
image file referenced by im. Returns 0 in case of error.
.nf

int
writergbline(im, red, green, blue)
image *im;
unsigned char *red, *green, *blue;

.fi
.TP
.I writergbaline(im, red, green, blue)
Write out a scanline worth of red, green, blue, and alpha channels to
the image file referenced by im. Returns 0 in case of error.
.nf

int
writergbaline(im, red, green, blue, alpha)
image *im;
unsigned char *red, *green, *blue, *alpha;

.fi
.TP
.I imagepos(im, x, y)
Set the next pixel to be read to be the pixel at (x, y) in
pixel coordinates. Returns EOF in case of error. At the
moment this call is only meaningful if x and y are both 0.
.nf

int
imagepos(im, x, y)
image *im;
int x, y;

.fi
.SS Functions For Changing Image Attributes.
.TP
.I imagebufsize(size)
Make the next call to openimage create an image buffer of the size
.I size
bytes.
.nf

imagebufsize(size)
int size;

.fi
.TP
.I copyheader(a, b)
Copy the header information in the image b into the image a.
.nf

copyheader(a, b)
image *a, *b;

.fi
.TP
.I setcmap(im, numc, red, green, blue)
Set the colourmap for image im.
Numc represents the number of colours in the colour map, and
red, green, and blue represent the red, green, and blue
channels in the colour map.
.nf

setcmap(im, numc, red, green, blue)
image *im;
int numc;
unsigned char *red, *green, *blue;

.fi
.SS Macros For Accessing Image Details.
.LP
The following macros can be used to assign and set header details
in the image structure. Im is an image pointer.
.TP
.I imagetype(im)
The image's magic number. See
.I pixfile (5)
for possible values.
.TP
.I imagewidth(im)
The image's width in pixels.
.TP
.I imageheight(im)
The image's height in pixels.
.TP
.I imagedate(im)
Creation date of the image.
.TP
.I imagefile(im)
Im's file descriptor.
.TP
.I imagetitle(im)
The title of the image. A character pointer.
.TP
.I titlelength(im)
The length of the image's title. Note: this includes the NULL
at the end of the string.
.TP
.I cmapsize(im)
The size of the image's colourmap.
.TP
.I redmap(im)
The red channel of the colourmap. An unsigned character pointer.
.TP
.I greenmap(im)
The green channel of the colourmap. An unsigned character pointer.
.TP
.I bluemap(im)
The blue channel of the colourmap. An unsigned character pointer.
.SS Macros which apply to image fragments.
If an image is a fragment of another image (see imagefragment(im)
below) four extra fields are set in the image header giving the
x and y address of the top left hand corner of the image relative
to the image it is a part of and the width and size of the original
image. The following macros are used to get and set the information.
.TP
.I imagexaddr(im)
The x address of the image in the original image.
.TP
.I imageyaddr(im)
The y address of the image in the original image.
.TP
.I imageorigwidth(im)
The width of the original image this image is a fragment of.
.TP
.I imageorigheight(im)
The height of the original image this image is a fragment of.
.SS Boolean Macros.
.TP
.LP
The following macros return non\-zero if the condition is true.
Im is an image pointer.
.TP
.I alphachannel(im)
Does the image im have an alpha channel?
.TP
.I rlecoded(im)
Is the image im run length encoded?
.TP
.I colormapped(im)
Is the image im colourmapped?
.TP
.I imagefragment(im)
Is the image im a fragment of another image?
.SH "SEE ALSO"
.IR art (1),
.IR disp (1),
.IR movie (1),
.IR vortinfo (1),
.IR targ2vort (1),
.IR vort2ps (1),
.IR median (1),
.IR mulmcut (1),
.IR greyscale (1),
.IR gamma (1).


  3 Responses to “Category : Printer + Display Graphics
Archive   : VORTEXE.ZIP
Filename : VORT.3

  1. Very nice! Thank you for this wonderful archive. I wonder why I found it only now. Long live the BBS file archives!

  2. This is so awesome! 😀 I’d be cool if you could download an entire archive of this at once, though.

  3. But one thing that puzzles me is the “mtswslnkmcjklsdlsbdmMICROSOFT” string. There is an article about it here. It is definitely worth a read: http://www.os2museum.com/wp/mtswslnk/