On this page |
Synopsis ¶
icp [options] [res] [sub] <inimage> [sub] <outimage>
where:
res
is [-w ‹width›] [-h ‹height›]
, and sub
is [-x
‹xoff›] [-y ‹yoff›] [-w ‹width›] [-h ‹height›]
or [-d
‹divs› ‹section›]
.
Description ¶
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.exr myimage.tif
…converts myimage.exr to a .tif format file.
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 (or region) 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.
Options ¶
-e
Continue copying even if errors occur
-m
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 (regions) to be copied into existing frames stored on disk without destroying the portion of the destination image outside the sub-image area.
-u
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).
-v
The -v option will output a status message to the standard error file indicating the source, destination and resolution of the copy operation.
-r ‹width› ‹height›
Scale the image to the given resolution.
-w ‹width›
Scale to the given width (the -h
option must also be specified for -w
to work).
-h ‹height›
:
Scale to the given height (the -w
option must also be specified for -h
to work).
-s ‹scale›
:
Scale to a percentage of the original resolution. For example, a scale of 50 will halve the resolution.
-j ‹u1› ‹v1› ‹u2› ‹v2›
Write with a data window (in UV coordinates).
-J ‹x1› ‹y1› ‹x2› ‹y2›
Write with a data window (in pixel coordinates).
-c ‹u1› ‹v1› ‹u2› ‹v2›
Specify a crop area (in UV coordinates).
-C ‹x1› ‹y1› ‹x2› ‹y2›
Specify a crop area (in pixel coordinates).
-f
Flip the image vertically when copying.
-F
Flip the image horizontally when copying.
-R
Flop the image 90' counterclockwise when copying.
-d ‹data_type›
Override the data type for the output image:
-
int8
: Signed 8-bit integer -
uint8
: Unsigned 8-bit integer -
int16
: Signed 16-bit integer -
uint16
: Unsigned 16-bit integer -
int32
: Signed 32-bit integer -
uint32
: Unsigned 32-bit integer -
real16
: 16-bit floating point -
real32
: 32-bit floating point
-p ‹pattern›
Include only AOVs matching the given pattern
in the output image. More
than one pattern can be specified (separated by spaces). The pattern can
be an AOV name or contain *
or ?
.
-P ‹indices›
Include only AOVs given by the list of indices
in the output image. The
first AOV is index 1. Ranges can be specified using [x-y]
.
-x
Extract AOVs into separate files. All AOVs will be extracted by default,
but a selection can be specified using the -p
or -P
option.
Each AOV will be saved to a new image with the AOV name appended to the original file name. For example:
% icp -x output.exr % ls output*exr output_basecolor.exr output_diffuse.exr output_hitN.exr output_hitP.exr
-X ‹pattern›
When extracting AOVs to separate files, specify list of AOVs which should
remain in linear space (even if the output format is 8-bit and only stores
colors in sRGB
).
-g ‹mode›
Enable auto-conversion of image colorspace.
-
auto
: Automatically determine using image format default -
off
: Disable color space conversion
-L ‹lut_file›
Load the image using the cineon LUT file.
-O ‹lut_file›
Save the image using the cineon LUT file.
-A
Update the author-related metadata for the new file.
-D
Create parent directories if needed.
Examples ¶
Convert an OpenEXR image into a JPEG image
icp source.exr output.jpg
Split all AOVs of an OpenEXR image into separate files
icp -x source.exr