ilerror(5)
DESCRIPTION
Error codes are returned from all IL functions to the error field of the context (ilContext). A code of IL_OK (0) means the function was successful. Otherwise, the error code is one of those listed in ilerrors.h, which are explained in this man page.
Note that if an error is returned by a function that adds to a pipe, the pipe is declared invalid. No further operations can succesfully be performed on the pipe except to destroy the pipe, using ilDestroyObject() or to empty the pipe using ilEmptyPipe().
IL_ERROR_LAST_STRIP (1)
This is not a true error. IL_ERROR_LAST_STRIP is returned by a producer pipe element when the last strip has been written. Type man ilAddPipeElement for details.
IL_ERROR_ELEMENT_AGAIN (2)
This is not a true error; it is used internally by the Image Library.
IL_ERROR_ELEMENT_COMPLETE (3)
This is not a true error; it is used internally by the Image Library.
IL_ERROR_PAR_NOT_ZERO (4)
A parameter was not zero although required to be zero (0), because it is reserved for future use.
IL_ERROR_VERSION_MISMATCH (5)
Returned by IL_CREATE_CONTEXT(). The Image Library /opt/image/lib/libil.sl installed on the system is an older version than is required by the program. A newer version must be installed.
IL_ERROR_BITS_PER_SAMPLE (6)
A value in the nBitsPerSample array in ilImageFormat is not in the range 1 through 32.
IL_ERROR_SAMPLES_PER_PIXEL (7)
The value in nSamplesPerPixel in ilImageDes is not in the range 1 through 5 or is incorrect for the image type defined by the type field.
IL_ERROR_LEVELS_PER_SAMPLE (8)
Either a value in the nLevelsPerSample array in ilImageDes is not in the range 2 through (1 << nBitsPerSample) - 1, or that value is greater than 256 for an IL_PALETTE image. If returned by ilScale(), this error indicates that the number of levels of gray identified for the IL_SCALE_BITONAL_TO_GRAY option is not in the range 2 through 256.
IL_ERROR_SAMPLE_ORDER (9)
The value in sampleOrder in ilImageFormat is not IL_SAMPLE_PIXELS or IL_SAMPLE_PLANES.
IL_ERROR_BYTE_ORDER (10)
The value in byteOrder in ilImageFormat is not IL_MSB_FIRST or IL_LSB_FIRST.
IL_ERROR_RESERVED_NOT_ZERO (11)
A value in the reserved field in ilImageDes or ilImageFormat is not zero (0), or the unused bits in ilImageDes.flags are not zero (0). Note that IL_INIT_IMAGE_DES() and IL_INIT_IMAGE_FORMAT() initialize the ilImageDes flags and reserved fields and the ilImageFormat reserved field to zero.
Note that IL_INIT_IMAGE_DES() and IL_INIT_IMAGE_FORMAT() initialize the ilImageDes and ilImageFormat reserved fields to zero.
IL_ERROR_ROW_BIT_ALIGN (12)
The value in rowBitAlign in ilImageFormat is not 8, 16, or 32.
IL_ERROR_COMPRESSION (13)
Either an invalid compression code or one not supported for the type of image of image being compressed was supplied, or an invalid compression option is supplied by pCompData. Note that pCompData must be NULL for compression types that currently accept no options. The valid compression types for each image type follow:
IL_BITONALIL_UNCOMPRESSED, IL_G3, IL_G4, IL_LZW, IL_PACKBITS
IL_GRAYIL_UNCOMPRESSED, IL_LZW, IL_JPEG, IL_PACKBITS
IL_PALETTEIL_UNCOMPRESSED, IL_LZW, IL_PACKBITS
IL_RGBIL_UNCOMPRESSED, IL_LZW, IL_JPEG
IL_YCBCRIL_UNCOMPRESSED, IL_LZW, IL_JPEG (see note below)
Note: for IL_YCBCR images, only IL_JPEG compression allows subsampled images to be written using ilWriteFileImage(). If IL_UNCOMPRESSED or IL_LZW compression is used, the image is upsampled before being written. Since subsampling is the main advantage of IL_YCBCR images over IL_RGB, it is recommended that IL_YCBCR images be written using only IL_JPEG compression.
IL_ERROR_IMAGE_TYPE (16)
An invalid image type was supplied for the requested operation. For example, an attempt was made to process a private type image, the type of image returned by ilGetPrivateType(). This error also may indicate a compression not supported for the given image type.
IL_ERROR_PIPE_STATE (17)
The given pipe is not in the correct state for the requested operation. To add a producer element to a pipe, the pipe must be empty; to add a filter or consumer the pipe must be forming; to execute a pipe the pipe must be executable. The current state of a pipe is returned by ilQueryPipe().
IL_ERROR_MALLOC (19)
This error indicates failure in an attempt to use malloc() to allocate the memory needed. If error returned from ilCreateClientImage() or ilCreateInternalImage(), this error could indicate an attempt to create a very large image.
IL_ERROR_OBJECT_TYPE (20)
The wrong type of object was identified, for example an attempt was made to use an XWC where a pipe was required. This error may indicate an invalid pointer is being passed to the function.
IL_ERROR_CONTEXT_MISMATCH (21)
Two or more objects identified do not belong to the same ilContext. An ilContext is identified when an object is created, and the object becomes bound to that context. The object may not be used in an operation with an object bound to any other context.
IL_ERROR_CIRCULAR_PIPE (22)
The image being written to by ilWriteImage() is the same image that was read using ilReadImage() to start the pipe. An image may not be read and written in the same pipe.
IL_ERROR_IMAGE_SIZE (23)
The image being written to with ilWriteImage() is not the same size as the current pipe image. ilCrop() or ilScale() can be used to change the size of the current pipe image. ilQueryPipe() returns the size of the pipe image. Note that image descriptor and format conversions as well as compression are performed as necessary to change the pipe image to the form identified for the image being written, but size conversions are not performed automatically.
IL_ERROR_PRODUCER_DATA (24)
ilAddPipeElement() was called identifying an element type of IL_PRODUCER but pDstData, pDstData->pDes or pDstData->pFormat was NULL.
IL_ERROR_USER_PIPE_ELEMENT (25)
An error was returned from an application-defined pipe element being executed by ilExecutePipe(), which returns IL_EXECUTE_ERROR. The actual error code is in the errorInfo field in the context ilContext. By convention, application-defined pipe elements return negative error codes.
IL_ERROR_PIPE_ELEMENT (26)
An error was returned from a standard IL pipe element being executed by ilExecutePipe(), which returns IL_EXECUTE_ERROR. The actual error code is in the errorInfo field in the context ilContext. By convention standard Image Library pipe elements return positive error codes.
IL_ERROR_CANT_CONVERT (27)
ilConvert() was called and could not perform the requested conversion. Note that many functions other than ilConvert() may return this error. A function that adds an element to the pipe may try to convert the current pipe image to a format it can handle by calling ilConvert(). This error is equivalent to IL_ERROR_NOT_IMPLEMENTED.
IL_ERROR_X_GET_IMAGE (28)
ilReadXDrawable() failed to read pixels from the requested drawable using XGetImage().
IL_ERROR_X_RESOURCE (29)
An error occurred accessing or creating an X resource. An error was return from XGetVisualInfo(), XCreatePixmap(), or XCreateGC().
IL_ERROR_NOT_IMPLEMENTED (30)
A request which is valid is not yet implemented. Also see the notes for IL_ERROR_CANT_CONVERT. The following are currently not implemented as features:
- filter operations on images with other than one (1) or three (3) samples per pixel
- IL_G4 compression
- IL_G3 compression with IL_G3M_UNCOMPRESSED or IL_G3M_2D options
- ilReadFileImage() from TIFF file images written in planar order
- support of YCbCr subsampled images in pixel order, or with other than 8 bits per sample
IL_ERROR_ELEMENT_TYPE (31)
The elementType parameter to ilAddPipeElement() was not IL_PRODUCER, IL_FILTER, or IL_CONSUMER.
IL_ERROR_ZERO_SIZE_IMAGE (32)
If returned by ilCreateClientImage(), ilCreateInternalImage(), or ilScale(), indicates that either the width or height (or both) is less than or equal to zero (0). If returned by ilAddPipeElement(), indicates that pDstData->width or pDstData->height is less than or equal to zero (0). If returned by ilReadXDrawable(), indicates the boundary rectangle of the given drawable intersected with the given rectangle yields a null rectangle (has width and/or height less than or equal to zero (0)). If returned by ilCrop(), indicates the current pipe image intersected with the given rectangle yields a null rectangle. A zero-sized pipe image is not allowed.
IL_ERROR_NULL_RECT_PTR (34)
ilCrop() was called with pRect set to NULL.
IL_ERROR_MAP_IMAGE (35)
This error indicates one of the following about the mapImage supplied to ilMap(). Either it is not an ilClientImage data structure, its width is not 256, its height is not one (1), it is compressed, it has an nSamplesPerPixel that does not match the current pipe image, or it is not eight (8) bits per sample for each sample.
IL_ERROR_EXECUTE_STACK_OVERFLOW (36)
This is an internal error in the Image Library pipe element functions.
IL_ERROR_EXECUTE_STACK_UNDERFLOW (37)
This is an internal error in the Image Library pipe element functions.
IL_ERROR_X_DRAWABLE (38)
The drawable supplied to ilReadXDrawable() is not recognized by the server at the given display. Note that no such error is returned for a drawable supplied to ilWriteXDrawable(); in that case an X protocol error occurs
IL_ERROR_X_COLORMAP_VISUAL (40)
A null colormap or visual was supplied to ilReadXDrawable() but the given drawable is not a bitmap and therefore requires a colormap and visual to determine the colors of the drawable’s pixels.
IL_ERROR_UNSUPPORTED_VISUAL (41)
ilReadXDrawable() does not support reading from the given visual, or the depth of the given drawable does not match the depth of the given visual. ilReadXDrawable() only supports reads from the following types of visuals:
- GrayScale or StaticGray visuals with depths of one (1) or eight (8)
- StaticColor or PseudoColor visuals with depth eight (8)
- DirectColor or TrueColor visuals with depth 24 and red_mask == 0xff0000, green_mask == 0xff00 and blue_mask == 0xff
IL_ERROR_SCALE_BITONAL_TO_GRAY (42)
The option IL_SCALE_BITONAL_TO_GRAY was supplied to ilScale(), but either the current pipe image is not bitonal or the given scale width and/or height is greater than that dimension in the current pipe image.
IL_ERROR_INVALID_OPTION (43)
An invalid option has been supplied to the function called.
IL_ERROR_FILE_IO (44)
An error occurred during a read, write or seek operation to a file. This error may indicate an improperly written file.
IL_ERROR_FILE_NOT_TIFF (45)
A TIFF file header was not found by ilConnectFile() in the given stream at the given offset. The file is not a TIFF file.
IL_ERROR_FILE_MALFORMED_TAG (46)
An improperly written TIFF file tag was found in the file being read. This error may indicate an improperly written TIFF file.
IL_ERROR_FILE_MISSING_TAG (47)
A required tag, such as ImageWidth, was not found in the file being read. This error may indicate an improperly written TIFF file.
IL_ERROR_FILE_TAG_VALUE (48)
An invalid value for a tag was found in the file being read. This error may indicate an improperly written TIFF file.
IL_ERROR_FILE_TAG_TYPE (49)
An invalid type for a tag was found in the file being read. This error may indicate an improperly written TIFF file. If returned from ilWriteFileImage(), this error indicates an invalid type in one of the user tags supplied.
IL_ERROR_FILE_STRIP_TAGS (50)
The strip tags are missing or have invalid values in the file being read. This error may indicate an improperly written TIFF file.
IL_ERROR_FILE_WRITE_METHOD (51)
The method parameter supplied to ilWriteFileImage() is not IL_WRITE_MAIN.
IL_ERROR_NULL_COMPRESSED_IMAGE (52)
An attempt to read from a compressed image with data occurred. When uncompressed images are created, the pixels are allocated but are not initialized. A read from an uncompressed image which has not been written will succeed but yield undefined pixels. Compressed images however have no pixel values until they are written. This error is returned if a pipe is executed that begins with an ilReadImage() of a compressed image that has never been written.
IL_ERROR_OPTION_DATA (55)
A non-NULL pointer to option data was supplied for an option that currently has no option data defined.
IL_ERROR_SUBSAMPLE (56)
For IL_YCBCR images only, the subsampleHoriz (horizontal) or subsampleVert (vertical) subsample values is not 1, 2 or 4, or the horizontal value is not equal to the vertical value for any one sample.
IL_ERROR_COMPRESSED_DATA (60)
An error occurred while decompressing indicating invalid compressed data. If the data was from a file this error may indicate an improperly written file.
IL_ERROR_MALFORMED_FILE_WRITE (61)
The strips being written to a TIFF file are not all the same size or were not all present. This indicates an error in a pipe element, which must have written strips which did not conform to the stripHeight and constantStrip fields of pDstData passed to ilAddPipeElement().
IL_ERROR_YCBCR_DATA (65)
Indicates one of the folllowing problems: either the data in ilImageDes.typeInfo.YCbCr is invalid; subsampleHoriz and/or subsampleVert for a sample is not 1, 2 or 4; refBlack is greater than or equal to refWhite for sample; or, positioning is not zero (0).
IL_ERROR_YCBCR_FORMAT (66)
A YCbCr image is being referenced with values for nBitsPerSample in ilImageFormat other than eight (8) for each sample.
IL_ERROR_YCBCR_TIFF (67)
This error is returned by ilWriteFileImage() if an attempt is made to write a YCbCr image with subsampling not supported by TIFF. TIFF Appendix 0 states the following requirements for typeInfo.YCbCr in ilImageDes:
- sample[0].subsampleHoriz and sample[0].subsampleVert both must be one (1)
- sample[1].subsampleHoriz must equal sample[2].subsampleHoriz
- sample[1].subsampleVert must equal sample[2].subsampleVert
- sample[1].subsampleVert must be less than or equal to sample[2].subsampleHoriz
In other words, the Y subsample factor must be one (1); the Cb and Cr horizontal and vertical factors must be equal, and the vertical factor must be less than or equal to the horizontal factor.
IL_ERROR_CONVERT_COMPRESSION (68)
The value in compression in the ilImageDes structure passed to ilConvert() was not IL_UNCOMPRESSED. ilConvert() does not perform compression; use ilCompress() to compress an image, or supply the compression to ilWriteFileImage() when writing an image to a TIFF file.
IL_ERROR_CONVERT_TO_PALETTE (69)
An invalid value was specified in the ilConvertToPaletteInfo structure passed to ilConvert(), specifying the IL_CONVERT_TO_PALETTE option.
IL_ERROR_EFS_IO (70)
An error occurred reading or writing an EFS file. This may indicate an invalid file.
IL_ERROR_EFS_OPEN (71)
An error occurred opening the file with ilEFSOpen(). This may indicate that the file does not exist if the file is opened for read or the file cannot be created if the file is opened for write.
IL_ERROR_EFS_NOT_MINE (72)
This error is returned by EFS file type handlers Open() function if the given file is not a valid file for this handler. This error is not returned by any Image Library functions.
IL_ERROR_EFS_EMPTY_FILE (73)
The given EFS file opened with ilEFSOpen() contains no supported images.
IL_ERROR_EFS_EOF (74)
This error is returned by ilEFSReadImage() if called when there are no more pages available from the file (ilEFSPageInfo.attributes & IL_EFS_EOF).
IL_ERROR_EFS_PRIVATE (75)
This error is returned by any EFS function if a file type-specific occurs. The private error code is returned in the errorInfo field in the context ilContext.
IL_ERROR_EFS_OPEN_MODE (76)
If returned from ilEFSOpen(): an invalid open mode, or one not supported by the requested file type, has been specified. If returned by from ilEFSWriteImage(): a mask image has been specified that is not in the correct format (an uncompressed client image with rowBitAlign of 32 and nSamplesPerPixel and nBitsPerSample[0] both equal to one (1)). Otherwise, the file was not opened with the correct open mode for the requested function (IL_EFS_READ for ilEFSSeek(); IL_EFS_READ or IL_EFS_READ_SEQUENTIAL for ilEFSGetPageInfo() or ilEFSReadImage(); IL_EFS_WRITE for ilEFSWriteImage().)
IL_ERROR_EFS_NO_FILE_TYPE (77)
No file type handler was found by ilEFSOpen() for the requested file; the file is not a valid instance of any supported file type.
IL_ERROR_EFS_FILE_TYPE_INFO (78)
Invalid data in the ilEFSFileTypeInfo structure was specified to ilEFSAddFileType().
IL_ERROR_EFS_READ_MODE (79)
This error is returned by ilEFSReadImage() if an invalid read mode was specified or IL_EFS_READ_MASK was specified and the current page has no mask.
IL_ERROR_EFS_FORMAT_ERROR (80)
The EFS file being accessed is not in the correct format or the format cannot be handled by the file type handler.
IL_ERROR_EFS_UNSUPPORTED (81)
The EFS file being accessed is in a valid format, but the format that is not supported by the file type handler.
IL_ERROR_PIPE_NOT_FED (82)
A pipe formed with ilFeedFromImage() or returned by ilTapPipe() is being executed by calling ilExecutePipe(). Pipes returned by ilTapPipe() are executed by calling ilExecutePipe() with the pipe that was tapped. Pipes formed with ilFeedFromImage() are executed by calling ilFeedPipe().
IL_ERROR_RAW_MODE (83)
ilWriteXDrawable() or ilConvertForXWrite() was called with an ilXWC in raw mode, but the format of the current pipe image is not compatible with the XWC visualType.
IL_ERROR_PALETTE_INFO (84)
An ilImageDes has been specified describing a dithered palette image (flags & IL_DITHERED_PALETTE) but the image type is not IL_PALETTE or the product of the levels is greater than nLevelsPerSample[0].
IL_ERROR_MALFORMED_IMAGE_WRITE (85)
This error is returned in errorInfo when a pipe formed with ilWriteImage() is executed and the wrong amount of data is written to the image. This may indicate an error in a application-defined filter or an internal error in an Image Library filter.
IL_ERROR_FEED_PIPE (86)
ilFeedPipe() was called with a pipe that was not formed with ilFeedFromImage(), or the sum start and nLines values passed to ilFeedPipe() are greater than the height value passed to ilFeedFromImage() when the pipe was formed.
AUTHOR
ilerror was developed by HP.
SEE ALSO
Using the Image Developer’s Kit.
Hewlett-Packard Company — Image Library: February, 1995