NAME
rgb.c - implements reading and writing sgi image files, uses io layer.
SYNOPSIS
io_glue *ig = io_new_fd( fd );
i_img *im = i_readrgb_wiol(ig, 0); // disallow partial reads
// or
io_glue *ig = io_new_fd( fd );
return_code = i_writergb_wiol(im, ig);
DESCRIPTION
imsgi.c implements the basic functions to read and write portable SGI files. It uses the iolayer and needs either a seekable source or an entire memory mapped buffer.
FUNCTION REFERENCE
Some of these functions are internal.
- rgb_header_unpack(header, headbuf)
-
Unpacks the header structure into from buffer and stores in the header structure.
header - header structure headbuf - buffer to unpack from - rgb_header_pack(header, headbuf)
-
Packs header structure into buffer for writing.
header - header structure headbuf - buffer to pack into - i_readsgi_wiol(ig, partial)
-
Read in an image from the iolayer data source and return the image structure to it. Returns NULL on error.
ig - io_glue object length - maximum length to read from data source, before closing it -1 signifies no limit. - i_writergb_wiol(img, ig)
-
Writes an image in targa format. Returns 0 on error.
img - image to store ig - io_glue object
1 POD Error
The following errors were encountered while parsing the POD:
- Around line 84:
=over without closing =back