|On this page|
icp [-v] [-u] [-m] [-b] [res] [sub] <inimage> [sub] <outimage> iconvert [-d depth]
[-w width] [-h height], and
xoff] [-y yoff] [-w width] [-h height] or
icp copies an image, or a portion thereof, from the inimage image to the outimage.
Without any arguments, icp copies an entire image from the specified source to the destination. At any time, if the resolutions of the source image and the destination image differ, icp will copy the largest portion of the source which will fit within the destination image.
If outimage is of a different file type than inimage, then the file is converted to the new filetype automatically. For example:
icp myimage.sgi myimage.tif
…converts myimage.sgi to a .tif format file.
If the destination image is an existing file the -m option indicates to icp that the file is to be modified rather than re-created. This allows sub-frames to be copied into existing frames stored on disk without destroying the portion of the destination image outside the sub-image area.
To avoid the internal allocation of memory for image storage, frames are copied on a per scanline basis, but may be overridden by specifying the -b block option, which reads/writes entire images in one operation.
To keep images from being compressed, you can use the -u option (uncompressed). This avoids run-length encoding (RLE) for output formats that support it. This includes, Prisms/Houdini (.pic), Wavefront (.rla/.rlb) and Targa (.tga/.vst).
Resolution + offset (Res)
An arbitrary portion of an image may specified by defining its resolution and its offset from the origin of the image. The width and height of the sub-area are specified with the -w and -h options respectively. If one is omitted, its value will be the full width or height of the image. These options must be specified before the source image on the command line.
Either the source or the destination image may have offsets specified for the sub-area. These are given with the -x and -y options. The offset options appearing in front of the source image apply to the source image, while those specified immediately before the destination apply to the destination. If one or both are omitted, their values default to zero.
If offsets are specified without a resolution, then icp adjusts the resolution of the image appropriately for the given offset values.
Divisions + image (SUB)
A sub-image may be specified for either the source or the destination by specifying the -d option before the source and/or the destination. This option takes two values representing the number of sub-frames into which the image is to be divided and the sub-image number to be used for this copy operation.
The number of sub-divisions must be the square of an integer. The sub-image number must be between zero and the number of sub-divisions -1 where sub-image 0 is at the top left corner and sub-image sub-divisions -1 is at the bottom right.
As with the offset specifications, the option appearing in front of the source image applies to the source image, while that specified immediately before the destination applies to the destination.
The two methods of specifying sub-areas of an image may be mixed so that one method is given for the source while the other is used for the destination. As mentioned above, any mis-match of resolutions will result in copying the largest portion of the source which will fit within the destination image area.
The -v option will output a status message to the standard error file indicating the source, destination and resolution of the copy operation.
To copy the top-right corner of the iris into the top-right corner of a previously saved file with 512 x 384 resolution:
iclear -w 800 -h 600 temp.pic icp -m -d 4 1 marble.pic -d 4 1 ip
To display the top half of an image:
icp -y 242 back.pic ip