Museum

Home

Lab Overview

Retrotechnology Articles

Online Manuals

⇒ ilReadFileI(3X) — HP-UX ANSI C A.10.11

Media Vault

Software Library

Restoration Projects

Artifacts Sought

Related Articles

ilConnectFile(3X)

ilListFileImages(3X)

ilReadFileImage(3X)

NAME

ilReadFileImage() − read an image from a TIFF file into a pipe

SYNOPSIS

ilBool
ilReadFileImage (

ilPipe pipe,

ilFileImage fileImage,

ilRect *pSrcRect,

unsigned long mustBeZero);

DESCRIPTION

ilReadFileImage() reads a pipe image from a TIFF file and passes it to the next element in the pipe. 

pipe identifies a pipe created by ilCreatePipe(). 

fileImage identifies an ilFileImage structure from the list returned by ilListFileImages(). 

*pSrcRect defines how much of the image to read.  If *pSrcRect is NULL, the entire image is read; otherwise, *pSrcRect identifies a rectangle that defines the part to read. 

mustBeZero identifies a value that must be zero; this parameter is reserved for future use. 

RETURN VALUE

Upon successful completion, ilReadFileImage() returns TRUE. 

ERRORS

If the call fails, context->error receives a non-zero error code. 

EXAMPLE

The following example opens a TIFF file, gets a list of images, and reads the first image from the TIFF file. 

ilPipe pipe;

char filename[];

ilContext context;

FILE stdioFile;

ilFile pFile;

ilFileImage fileList;
.
.
.

if (!(stdioFile = fopen(filename, "r+")) return(IL_ERROR_FILE_IO);

if (!(pFile = ilConnectFile(context, stdioFile, 0, 0)))
return(context->error);

if (!(fileList = ilListFileImages (pFile, 0)))
return(context->error);

if (!(ilReadFileImage(pipe, fileList, NULL, 0)))
return(context->error);

AUTHOR

ilReadFileImage() was developed by HP. 

SEE ALSO

ilConnectFile(3X), ilListFileImages(3X). 

Using the Image Developer’s Kit.

Hewlett-Packard Company  —  Image Library: February, 1995

Typewritten Software • bear@typewritten.org • Edmonds, WA 98026