ilFeedPipe(3X)
NAME
ilFeedPipe() − execute a pipe that used ilFeedFromImage() as the pipe producer
SYNOPSIS
int
ilFeedPipe (
ilPipe pipe,
long start,
long nLines,
long nCompBytes,
unsigned long mustBeZero);
DESCRIPTION
ilFeedPipe() executes a pipe that used ilFeedFromImage() as the pipe producer. Using ilFeedFromImage() and ilFeedPipe(), the caller can feed pixels into a pipe in strips (horizontal slices of the image). If needed, the image pixels can be modified after each call to ilFeedPipe().
pipe is a pipe created by ilCreatePipe().
start is the first line fed. If the image is uncompressed (IL_UNCOMPRESSED), the lines are fed starting at line start within the image, where line zero (0) is the first line. If the image is compressed start is the offset from the beginning of the image pixels to the first byte to be decompressed.
nLines is the number of lines of image pixels to pass down the pipe.
nCompBytes is used only if the image is compressed. nCompBytes sets the number of bytes of compressed data that are passed down the pipe, starting at start bytes from the beginning of the image pixels.
mustBeZero is a value that must be zero; this parameter is reserved for future use.
RETURN VALUE
ilFeedPipe() returns the same values as returned by ilExecutePipe(). IL_EXECUTE_COMPLETE is returned when the totalled values for nLines for each call equals the value for height passed to ilFeedFromImage(). IL_EXECUTE_AGAIN is returned if ilFeedPipe() must be called again to complete execution. IL_EXECUTE_ERROR is returned if an error occurs; the pipe state becomes IL_PIPE_INVALID. Refer to ilExecutePipe(3X) for more details.
ERRORS
If the call fails, context->error receives a non-zero error code.
EXAMPLE
The following example feeds an image, one strip at a time, into a pipe whose producer was created with ilFeedFromImage.
ilPipe pipe;
ilImageInfo *pClientInfo;
long stripHeight = 16;
long lineStart = 0;
int status;
.
.
do {
status = ilFeedPipe(pipe, lineStart,
stripHeight, 0, 0);
} while (status == IL_EXECUTE_AGAIN);
if (context->error) return (context->error);
AUTHOR
ilFeedPipe() was developed by HP.
SEE ALSO
ilExecutePipe(3X), ilFeedFromImage(3X), ilerror(3X).
Using the Image Developer’s Kit.
Hewlett-Packard Company — Image Library: February, 1995