DOKK / manpages / debian 10 / openimageio-tools / oiiotool.1.en
OIIOTOOL(1) General Commands Manual OIIOTOOL(1)

oiiotool - the OIIO Swiss Army Knife

oiiotool [filename|option|action]...

The oiiotool program will read images (from any file format for which an ImageInput plugin can be found), perform various operations on them, and write images (in any format for which an ImageOutput plugin can be found).

The oiiotool utility is invoked as follows:

oiiotool args

oiiotool maintains an image stack, with the top image in the stack also called the current image. The stack begins containing no images.

oiiotool arguments consist of image names, or commands. When an image name is encountered, that image is pushed on the stack and becomes the new current image.

Most other commands either alter the current image (replacing it with the alteration), or in some cases will pull more than one image off the stack (such as the current image and the next item on the stack) and then push a new image.

For a complete description, see /usr/share/doc/openimageio-doc/openimageio.pdf.gz.

Print help message
Verbose status messages
Quiet mode (turn verbose off)
Print runtime statistics
Do operations on all subimages/miplevels
Print resolution and metadata on all inputs
Regex: which metadata is printed with -info -v
Regex: which metadata is excluded with -info -v
Print pixel statistics on all inputs
Print SHA-1 hash of each input image
Count of how many pixels have the given color (argument: color;color;...) (optional args: eps=color)
Count of how many pixels are outside the low and high color arguments (each is a comma-separated color value list)
Do not overwrite existing files
Number of threads (default 0 == #cores)
Frame range for '#' wildcards
Frame number padding digits

Output the current image to the named file

'-d TYPE' sets the output data format of all channels, '-d CHAN=TYPE' overrides a single named channel (multiple -d args are allowed).
Data types include: uint8, sint8, uint10, uint12, uint16, sint16, half, float, double
Output scanline images
Output tiled images (tilewidth, tileheight)
Set the compression method
Set the compression quality, 1-100
Force planarconfig (contig, separate, default)
Adjust file times to match DateTime metadata
Do not automatically crop images whose formats don't support separate pixel data and full/display windows
Automatically trim black borders upon output to file formats that support separate pixel data and full/display windows

Sets metadata attribute (name, value)
Sets string metadata attribute (name, value)
Sets caption (ImageDescription metadata)
Add a keyword
Clear all keywords
Set the assumed orientation
Rotate orientation 90 deg clockwise
Rotate orientation 90 deg counter-clockwise
Rotate orientation 180 deg
Set the pixel data window origin (e.g. +20+10)
Set the display window (e.g., 1920x1080, 1024x768+100+0, -20-30)
Set the 'full' image range to be the pixel data window
Set the channel names (comma-separated)

Failure threshold difference (0.000001)
Allow this percentage of failures in diff (0)
Fail diff if any one pixel exceeds this error (infinity)
Warning threshold difference (0.00001)
Allow this percentage of warnings in diff (0)
Warn if any one pixel difference exceeds this error (infinity)

Create a blank image (args: geom, channels)
Create a patterned image (args: pattern, geom, channels)
Create a centered convolution kernel (args: name, geom)
Capture an image (options: camera=%d)
Print report on the difference of two images (modified by --fail, --failpercent, --hardfail, --warn, --warnpercent --hardwarn)
Add two images
Subtract two images
Take the absolute value of the image pixels
Multiply two images
Multiply the image values by a scalar or per-channel constants (e.g.: 0.5 or 1,1.25,0.5)
Add to all channels a scalar or per-channel constants (e.g.: 0.5 or 1,1.25,0.5)
Turn into 1-channel image by summing channels (options: weight=r,g,...)
Paste fg over bg at the given position (e.g., +100+50)
Assemble images into a mosaic (arg: WxH; options: pad=0)
'Over' composite of two images
Depth composite two images with Z channels (options: zeroisinf=%d)
Histogram one channel (options: cumulative=0)
Flip the image vertically (top<->bottom)
Flop the image horizontally (left<->right)
Flip and flop the image (180 degree rotation)
Transpose the image
Circular shift the image (e.g.: +20-10)
Set pixel data resolution and offset, cropping or padding if necessary (WxH+X+Y or xmin,ymin,xmax,ymax)
Crop or pad to make pixel data region match the "full" region
Resample (640x480, 50%)
Resize (640x480, 50%) (optional args: filter=%s)
Resize to fit within a window size (optional args: filter=%s, pad=%d)
Convolve with a kernel
Blur the image (arg: WxH; options: kernel=name)
Unsharp mask (options: kernel=gaussian, width=3, contrast=1, threshold=0)
Take the FFT of the image
Take the inverse FFT of the image
Fix NaN/Inf values in the image (options: none, black, box3)
Fill in holes (where alpha is not 1)
Fill a region (options: color=)
Clamp values (options: min=..., max=..., clampalpha=0)
Compress the range of pixel values > 1 with a log scale (options: luma=0|1)
Un-rangecompress pixel values > 1 (options: luma=0|1)
Render text into the current image (options: x=, y=, size=, color=)

Select or shuffle channels (e.g., "R,G,B", "B,G,R", "2,3,4")
Append the channels of the last two images
Discard all but the top level of a MIPmap
Select just one MIP level (0 = highest res)
Select just one subimage
Throw away the current image
Duplicate the current image (push a copy onto the stack)
Swap the top two images on the stack.

Set the assumed color space (without altering pixels)
Convert the current image's pixels to a named color space
Convert pixels from 'src' to 'dst' color space (without regard to its previous interpretation)
Apply the named OCIO look (optional args: from=, to=, inverse=, key=, value=)
Divide all color channels of the current image by the alpha to "un-premultiply"
Multiply all color channels of the current image by the alpha

Known color spaces: "linear", "sRGB", "Rec709"

iconvert(1), idiff(1), igrep(1), iinfo(1), iv(1), maketx(1).

OpenImageIO was written by Larry Gritz and the other authors and contributors.

This manual page was written by IRIE Shinsuke <irieshinsuke@yahoo.co.jp>, for the Debian project (and may be used by others).

August 10, 2013