oiiotool(1) 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.


Options (general):

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
--metamatch %s
Regex: which metadata is printed with -info -v
--no-metamatch %s
Regex: which metadata is excluded with -info -v
Print pixel statistics on all inputs
Print SHA-1 hash of each input image
--colorcount %s
Count of how many pixels have the given color (argument: color;color;...) (optional args: eps=color)
--rangecheck %s %s
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
--threads %d
Number of threads (default 0 == #cores)
--frames %s
Frame range for '#' wildcards
--framepadding %d
Frame number padding digits

Commands that write images:

-o %s
Output the current image to the named file

Options that affect subsequent image output:

-d %s
'-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
--tile %d %d
Output tiled images (tilewidth, tileheight)
--compression %s
Set the compression method
--quality %d
Set the compression quality, 1-100
--planarconfig %s
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

Options that change current image metadata (but not pixel values):

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

Options that affect subsequent actions:

--fail %g
Failure threshold difference (0.000001)
--failpercent %g
Allow this percentage of failures in diff (0)
--hardfail %g
Fail diff if any one pixel exceeds this error (infinity)
--warn %g
Warning threshold difference (0.00001)
--warnpercent %g
Allow this percentage of warnings in diff (0)
--hardwarn %g
Warn if any one pixel difference exceeds this error (infinity)


--create %s %d
Create a blank image (args: geom, channels)
--pattern %s %s %d
Create a patterned image (args: pattern, geom, channels)
--kernel %s %s
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
--cmul %s
Multiply the image values by a scalar or per-channel constants (e.g.: 0.5 or 1,1.25,0.5)
--cadd %s
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 %s
Paste fg over bg at the given position (e.g., +100+50)
--mosaic %s
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 %s %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
--cshift %s
Circular shift the image (e.g.: +20-10)
--crop %s
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 %s
Resample (640x480, 50%)
--resize %s
Resize (640x480, 50%) (optional args: filter=%s)
--fit %s
Resize to fit within a window size (optional args: filter=%s, pad=%d)
Convolve with a kernel
--blur %s
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
--fixnan %s
Fix NaN/Inf values in the image (options: none, black, box3)
Fill in holes (where alpha is not 1)
--fill %s
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)
--text %s
Render text into the current image (options: x=, y=, size=, color=)

Image stack manipulation:

--ch %s
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
--selectmip %d
Select just one MIP level (0 = highest res)
--subimage %d
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.

Color management:

--iscolorspace %s
Set the assumed color space (without altering pixels)
--tocolorspace %s
Convert the current image's pixels to a named color space
--colorconvert %s %s
Convert pixels from 'src' to 'dst' color space (without regard to its previous interpretation)
--ociolook %s
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"


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

This manual page was written by IRIE Shinsuke <[email protected]>, for the Debian project (and may be used by others).