.\" Copyright (c) 1986, 1987, University of Utah .TH RLE_GETRAW 3 2/2/87 3 .UC 4 .SH NAME rle_getraw \- Read run length encoded data from an RLE file. .br rle_freeraw \- Free pixel storage allocated by rle_getraw. .SH SYNOPSIS .B #include .br .B #include .sp .B unsigned int rle_getraw( the_hdr, scanraw, nraw ) .br .B rle_hdr * the_hdr; .br .B rle_op ** scanraw; .br .B int * nraw; .sp .B void rle_freeraw( the_hdr, scanraw, nraw ); .br .B rle_hdr * the_hdr; .br .B rle_op ** scanraw; .br .B int * nraw; .SH DESCRIPTION .I Rle_getraw can be used to read information from an RLE file in the "raw" form. The .IR scanraw argument is an array of pointers to arrays of .IR rle_op (3) structures. Each .I rle_op structure specifies a run or sequence of pixel values. The array .I nraw gives the number of .I rle_op structures for each channel. I.e., .I nraw[i] is the length of the array pointed to by .IR scanraw[i] . .PP Return value is the current scanline number. Returns 32768 at EOF. .PP Sufficient space must be allocated in the arrays of .I rle_op structures to hold the data read from the file. A function, .IR rle_raw_alloc (3), is provided to make this easier. The storage required by any pixel sequences in the input will be dynamically allocated by .IR rle_getraw . The pixel storage allocated dynamically by .IR rle_getraw (3) must be freed to avoid memory leaks. This is most easily accomplished by calling .IR rle_freeraw . The argument .I scanraw points to an array of .I rle_op structures, with .I nraw indicating the number of structures in each channel. All pixel data arrays will be freed by the call to .IR rle_freeraw . .SH EXAMPLE The usual code looks something like .nf rle_hdr in_hdr, out_hdr; rle_op **raw; int *nraw; while ( rle_getraw( &in_hdr, raw, nraw ) != 32768 ) { /* Process data. */ rle_putraw( &out_hdr, raw, nraw ); rle_freeraw( &in_hdr, raw, nraw ); } .fi .SH SEE ALSO .na .IR rle_hdr (3), .IR rle_op (3), .IR rle_putraw (3), .IR rle_raw_alloc (3), .IR rle_raw_free (3), .IR rle_getrow (3), .IR rle_getskip (3), .IR librle (3), .IR RLE (5). .ad b .SH AUTHOR Spencer W. Thomas .br University of Utah