oiiotool(1) the OIIO Swiss Army Knife

SYNOPSIS

oiiotool [filename|option|action]...

DESCRIPTION

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

Options (general):

--help
Print help message
-v
Verbose status messages
-q
Quiet mode (turn verbose off)
--runstats
Print runtime statistics
-a
Do operations on all subimages/miplevels
--info
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
--stats
Print pixel statistics on all inputs
--hash
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)
--no-clobber
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
--scanline
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-time
Adjust file times to match DateTime metadata
--noautocrop
Do not automatically crop images whose formats don't support separate pixel data and full/display windows
--autotrim
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-keywords
Clear all keywords
--orientation %d
Set the assumed orientation
--rotcw
Rotate orientation 90 deg clockwise
--rotccw
Rotate orientation 90 deg counter-clockwise
--rot180
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)
--fullpixels
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)

Actions:

--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
Capture an image (options: camera=%d)
--diff
Print report on the difference of two images (modified by --fail, --failpercent, --hardfail, --warn, --warnpercent --hardwarn)
--add
Add two images
--sub
Subtract two images
--abs
Take the absolute value of the image pixels
--mul
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)
--chsum
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
'Over' composite of two images
--zover
Depth composite two images with Z channels (options: zeroisinf=%d)
--histogram %s %d
Histogram one channel (options: cumulative=0)
--flip
Flip the image vertically (top<->bottom)
--flop
Flop the image horizontally (left<->right)
--flipflop
Flip and flop the image (180 degree rotation)
--transpose
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)
--croptofull
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
Convolve with a kernel
--blur %s
Blur the image (arg: WxH; options: kernel=name)
--unsharp
Unsharp mask (options: kernel=gaussian, width=3, contrast=1, threshold=0)
--fft
Take the FFT of the image
--ifft
Take the inverse FFT of the image
--fixnan %s
Fix NaN/Inf values in the image (options: none, black, box3)
--fillholes
Fill in holes (where alpha is not 1)
--fill %s
Fill a region (options: color=)
--clamp
Clamp values (options: min=..., max=..., clampalpha=0)
--rangecompress
Compress the range of pixel values > 1 with a log scale (options: luma=0|1)
--rangeexpand
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")
--chappend
Append the channels of the last two images
--unmip
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
--pop
Throw away the current image
--dup
Duplicate the current image (push a copy onto the stack)
--swap
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=)
--unpremult
Divide all color channels of the current image by the alpha to "un-premultiply"
--premult
Multiply all color channels of the current image by the alpha

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

AUTHOR

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).