impPackRow(3)

impPackRow, impUnpackRow - convert pixel width between 1 and 2 bytes

As shipped in IRIX 6.5.22. Unchanged since IRIX 6.5.

NAME
     impPackRow, impUnpackRow - convert pixel width between 1 and 2 bytes

SYNOPSIS
     #include <imp.h>

     void impPackRow(uchar_t *dptr, short *sptr, int n);

     void impUnpackRow(short *dptr, uchar_t *sptr, int n);

DESCRIPTION
     impPackRow converts the array of short integers pointed to by sptr into
     the array of unsigned char values pointed to by dptr. Source data that is
     to large to fit in a character is truncated. For example, the source
     value 0x0B56 will be converted into 0x56 in the destination array.

     impUnpackRow converts the array of unsigned char values pointed to by
     sptr into the array of short integers pointed to by dptr.  For example,
     the source value 0x56 will be converted into 0x0056 in the destination
     array.

     The parameter n specifies the number of elements in the source and
     destination arrays.

NOTE
     The allocation of storage for the source and destination arrays is the
     responsibility of the caller.

SEE ALSO
     libimp(3)