1oiiotool(1)                       OpenImageIO                      oiiotool(1)
2
3
4

TITLE

6       oiiotool -- simple image processing operations
7

SYNOPSIS

9       Usage:  oiiotool [filename,option,action]...
10
11

DESCRIPTION

13       This  program  is  part of the OpenImageIO (http://www.openimageio.org)
14       tool suite.  Detailed documentation is avaliable in pdf format with the
15       OpenImageIO distribution.
16

OPTIONS

18       Options (general):
19
20              --help Print help message
21
22              -v     Verbose status messages
23
24              -q     Quiet mode (turn verbose off)
25
26              -n     No saved output (dry run)
27
28              -a     Do operations on all subimages/miplevels
29
30              --debug
31                     Debug mode
32
33              --runstats
34                     Print runtime statistics
35
36              --info Print  resolution  and basic info on all inputs, detailed
37                     metadata if -v is  also  used  (options:  format=xml:ver‐
38                     bose=1)
39
40              --echo %s                Echo  message to console (options: new‐
41                     line=0)
42
43              --metamatch %s
44                     Regex: which metadata is printed with -info -v
45
46              --no-metamatch %s
47                     Regex: which metadata is excluded with -info -v
48
49              --stats
50                     Print pixel statistics on all inputs
51
52              --dumpdata
53                     Print all pixel data values (options: empty=0)
54
55              --hash Print SHA-1 hash of each input image
56
57              --colorcount
58                     %s         Count of how many pixels have the given  color
59                     (argument: color;color;...) (options: eps=color)
60
61              --rangecheck
62                     %s  %s       Count of how many pixels are outside the low
63                     and high color arguments (each is a comma-separated color
64                     value list)
65
66              --no-clobber
67                     Do not overwrite existing files
68
69              --threads
70                     %d            Number of threads (default 0 == #cores)
71
72              --frames %s
73                     Frame range for '#' or printf-style wildcards
74
75              --framepadding %d
76                     Frame  number  padding digits (ignored when using printf-
77                     style wildcards)
78
79              --views %s
80                     Views for %V/%v wildcards (comma-separated,  defaults  to
81                     left,right)
82
83              --wildcardoff
84                     Disable numeric wildcard expansion for subsequent command
85                     line arguments
86
87              --wildcardon
88                     Enable numeric wildcard expansion for subsequent  command
89                     line arguments
90
91              --no-autopremult
92                     Turn off automatic premultiplication of images with unas‐
93                     sociated alpha
94
95              --autopremult
96                     Turn on automatic premultiplication of images with  unas‐
97                     sociated alpha
98
99              --autoorient
100                     Automatically --reorient all images upon input
101
102              --autocc
103                     Automatically color convert based on filename
104
105              --noautocc
106                     Turn off automatic color conversion
107
108              --native
109                     Keep native pixel data type (bypass cache if necessary)
110
111              --cache
112                     %d              ImageCache size (in MB: default=4096)
113
114              --autotile
115                     %d              Autotile    size    for   cached   images
116                     (default=4096)
117
118       Commands that read images:
119
120              -i     %s                    Input  file  (argument:   filename)
121                     (options: now=, printinfo=, autocc=, type=, ch=)
122
123              --iconfig
124                     %s  %s          Sets input config attribute (name, value)
125                     (options: type=...)
126
127       Commands that write images:
128
129              -o     %s                   Output  the  current  image  to  the
130                     named file
131
132              -otex  %s                Output the current image as a texture
133
134              -oenv  %s                 Output  the current image as a latlong
135                     env map
136
137       Options that affect subsequent image output:
138
139              -d     %s                   '-d TYPE' sets the output data  for‐
140                     mat  of  all  channels, '-d CHAN=TYPE' overrides a single
141                     named channel (multiple -d args are allowed). Data  types
142                     include:  uint8,  sint8,  uint10, uint12, uint16, sint16,
143                     uint32, sint32, half, float, double
144
145              --scanline
146                     Output scanline images
147
148              --tile %d %d            Output tiled  images  (tilewidth,  tile‐
149                     height)
150
151              --compression %s
152                     Set the compression method
153
154              --quality %d
155                     Set the compression quality, 1-100
156
157              --dither
158                     Add dither to 8-bit output
159
160              --planarconfig %s
161                     Force planarconfig (contig, separate, default)
162
163              --adjust-time
164                     Adjust file times to match DateTime metadata
165
166              --noautocrop
167                     Do not automatically crop images whose formats don't sup‐
168                     port separate pixel data and full/display windows
169
170              --autotrim
171                     Automatically trim black borders upon output to file for‐
172                     mats  that  support  separate pixel data and full/display
173                     windows
174
175       Options that change current image metadata (but not pixel values):
176
177              --attrib
178                     %s %s           Sets  metadata  attribute  (name,  value)
179                     (options: type=...)
180
181              --sattrib
182                     %s  %s          Sets  string  metadata  attribute  (name,
183                     value)
184
185              --eraseattrib
186                     %s        Erase attributes matching regex
187
188              --caption
189                     %s            Sets caption (ImageDescription metadata)
190
191              --keyword
192                     %s            Add a keyword
193
194              --clear-keywords
195                     Clear all keywords
196
197              --nosoftwareattrib
198                     Do not write command line into  Exif:ImageHistory,  Soft‐
199                     ware metadata attributes
200
201              --sansattrib
202                     Write  command  line  into  Software  &  ImageHistory but
203                     remove --sattrib and --attrib options
204
205              --orientation
206                     %d        Set the assumed orientation
207
208              --orientcw
209                     Rotate orientation metadata 90 deg clockwise
210
211              --orientccw
212                     Rotate orientation metadata 90 deg counter-clockwise
213
214              --orient180
215                     Rotate orientation metadata 180 deg
216
217              --origin
218                     %s             Set the pixel  data  window  origin  (e.g.
219                     +20+10)
220
221              --fullsize
222                     %s            Set  the  display  window (e.g., 1920x1080,
223                     1024x768+100+0, -20-30)
224
225              --fullpixels
226                     Set the 'full' image range to be the pixel data window
227
228              --chnames
229                     %s            Set the channel names (comma-separated)
230
231       Options that affect subsequent actions:
232
233              --fail %g
234                     Failure threshold difference (0.000001)
235
236              --failpercent %g
237                     Allow this percentage of failures in diff (0)
238
239              --hardfail %g
240                     Fail diff if any one pixel exceeds this error (infinity)
241
242              --warn %g
243                     Warning threshold difference (0.00001)
244
245              --warnpercent %g
246                     Allow this percentage of warnings in diff (0)
247
248              --hardwarn %g
249                     Warn if any  one  pixel  difference  exceeds  this  error
250                     (infinity)
251
252       Actions:
253
254              --create
255                     %s  %d           Create  a blank image (args: geom, chan‐
256                     nels)
257
258              --pattern
259                     %s %s %d      Create a patterned  image  (args:  pattern,
260                     geom,   channels).   Patterns:   black,  constant,  fill,
261                     checker, noise
262
263              --kernel
264                     %s  %s           Create  a  centered  convolution  kernel
265                     (args: name, geom)
266
267              --capture
268                     Capture an image (options: camera=%d)
269
270              --diff Print report on the difference of two images (modified by
271                     --fail, --failpercent, --hardfail, --warn,  --warnpercent
272                     --hardwarn)
273
274              --pdiff
275                     Print  report  on the perceptual difference of two images
276                     (modified by --fail, --failpercent,  --hardfail,  --warn,
277                     --warnpercent --hardwarn)
278
279              --add  Add two images
280
281              --addc %s
282                     Add  to  all  channels  a scalar or per-channel constants
283                     (e.g.: 0.5 or 1,1.25,0.5)
284
285              --sub  Subtract two images
286
287              --subc %s
288                     Subtract from all channels a scalar or  per-channel  con‐
289                     stants (e.g.: 0.5 or 1,1.25,0.5)
290
291              --mul  Multiply two images
292
293              --mulc %s
294                     Multiply the image values by a scalar or per-channel con‐
295                     stants (e.g.: 0.5 or 1,1.25,0.5)
296
297              --div  Divide first image by second image
298
299              --divc %s
300                     Divide the image values by a scalar or  per-channel  con‐
301                     stants (e.g.: 0.5 or 1,1.25,0.5)
302
303              --mad  Multiply two images, add a third
304
305              --invert
306                     Take the color inverse (subtract from 1)
307
308              --abs  Take the absolute value of the image pixels
309
310              --absdiff
311                     Absolute difference between two images
312
313              --absdiffc %s
314                     Absolute  difference  versus a scalar or per-channel con‐
315                     stant (e.g.: 0.5 or 1,1.25,0.5)
316
317              --powc %s
318                     Raise the image values to a scalar or  per-channel  power
319                     (e.g.: 2.2 or 2.2,2.2,2.2,1.0)
320
321              --noise
322                     Add noise to an image (options: type=gaussian:mean=0:std‐
323                     dev=0.1,                      type=uniform:min=0:max=0.1,
324                     type=salt:value=0:portion=0.1, seed=0
325
326              --chsum
327                     Turn  into  1-channel image by summing channels (options:
328                     weight=r,g,...)
329
330              --colormap %s
331                     Color map based on channel  0  (arg:  "blue-red",  "spec‐
332                     trum", "heat", or comma-separated list of RGB triples)
333
334              --crop %s                Set  pixel  data resolution and offset,
335                     cropping   or   padding   if   necessary   (WxH+X+Y    or
336                     xmin,ymin,xmax,ymax)
337
338              --croptofull
339                     Crop  or  pad  to make pixel data region match the "full"
340                     region
341
342              --trim Crop to the minimal ROI containing nonzero pixel values
343
344              --cut  %s                Cut out the ROI and reposition  to  the
345                     origin (WxH+X+Y or xmin,ymin,xmax,ymax)
346
347              --paste
348                     %s               Paste  fg  over bg at the given position
349                     (e.g., +100+50)
350
351              --mosaic
352                     %s             Assemble images into a mosaic  (arg:  WxH;
353                     options: pad=0)
354
355              --over ’Over' composite of two images
356
357              --zover
358                     Depth  composite  two  images  with  Z channels (options:
359                     zeroisinf=%d)
360
361              --deepmerge
362                     Merge/composite two deep images
363
364              --deepholdout
365                     Hold out one deep image by another
366
367              --histogram
368                     %s %d       Histogram one channel (options: cumulative=0)
369
370              --rotate90
371                     Rotate the image 90 degrees clockwise
372
373              --rotate180
374                     Rotate the image 180 degrees
375
376              --rotate270
377                     Rotate the image 270 degrees  clockwise  (or  90  degrees
378                     CCW)
379
380              --flip Flip the image vertically (top<->bottom)
381
382              --flop Flop the image horizontally (left<->right)
383
384              --reorient
385                     Rotate  and/or  flop the image to transform the pixels to
386                     match the Orientation metadata
387
388              --transpose
389                     Transpose the image
390
391              --cshift
392                     %s             Circular shift the image (e.g.: +20-10)
393
394              --resample
395                     %s           Resample (640x480, 50%) (options: interp=0)
396
397              --resize
398                     %s             Resize (640x480, 50%) (options: filter=%s)
399
400              --fit  %s                Resize to  fit  within  a  window  size
401                     (options: filter=%s, pad=%d, exact=%d)
402
403              --pixelaspect
404                     %g         Scale  up the image's width or height to match
405                     the given pixel aspect ratio (options: filter=%s)
406
407              --rotate
408                     %g             Rotate pixels (argument is degrees  clock‐
409                     wise)  around  the center of the display window (options:
410                     filter=%s, center=%f,%f, recompute_roi=%d
411
412              --warp %s               Warp pixels (argument is a  3x3  matrix,
413                     separated   by   commas)   (options:   filter=%s,  recom‐
414                     pute_roi=%d)
415
416              --convolve
417                     Convolve with a kernel
418
419              --blur %s               Blur the image (arg: WxH; options:  ker‐
420                     nel=name)
421
422              --median
423                     %s             Median filter the image (arg: WxH)
424
425              --dilate
426                     %s             Dilate (area maximum) the image (arg: WxH)
427
428              --erode
429                     %s              Erode (area minimum) the image (arg: WxH)
430
431              --unsharp
432                     Unsharp  mask  (options:  kernel=gaussian,  width=3, con‐
433                     trast=1, threshold=0)
434
435              --laplacian
436                     Laplacian filter the image
437
438              --fft  Take the FFT of the image
439
440              --ifft Take the inverse FFT of the image
441
442              --polar
443                     Convert complex (real,imag) to polar (amplitude,phase)
444
445              --unpolar
446                     Convert polar (amplitude,phase) to complex (real,imag)
447
448              --fixnan
449                     %s             Fix NaN/Inf values in the image  (options:
450                     none, black, box3, error)
451
452              --fillholes
453                     Fill in holes (where alpha is not 1)
454
455              --clamp
456                     Clamp values (options: min=..., max=..., clampalpha=0)
457
458              --rangecompress
459                     Compress  the  range  of  pixel  values  with a log scale
460                     (options: luma=0|1)
461
462              --rangeexpand
463                     Un-rangecompress pixel values  back  to  a  linear  scale
464                     (options: luma=0|1)
465
466              --line %s               Render a poly-line (args: x1,y1,x2,y2...
467                     ; options: color=)
468
469              --box  %s                 Render  a  box  (args:  x1,y1,x2,y2  ;
470                     options: color=)
471
472              --fill %s               Fill a region (options: color=)
473
474              --text %s                Render  text  into  the  current  image
475                     (options: x=, y=, size=, color=)
476
477       Manipulating channels or subimages:
478
479              --ch   %s                  Select  or  shuffle  channels  (e.g.,
480                     "R,G,B", "B,G,R", "2,3,4")
481
482              --chappend
483                     Append the channels of the last two images
484
485              --unmip
486                     Discard all but the top level of a MIPmap
487
488              --selectmip
489                     %d          Select just one MIP level (0 = highest res)
490
491              --subimage
492                     %s           Select just one subimage (by index or name)
493
494              --sisplit
495                     Split the top image's subimges into separate images
496
497              --siappend
498                     Append the last two images into one multi-subimage image
499
500              --siappendall
501                     Append all images on the stack into a single multi-subim‐
502                     age image
503
504              --deepen
505                     Deepen normal 2D image to deep
506
507              --flatten
508                     Flatten deep image to non-deep
509
510       Image stack manipulation:
511
512              --dup  Duplicate the current image (push a copy onto the stack)
513
514              --swap Swap the top two images on the stack.
515
516              --pop  Throw away the current image
517
518              --label
519                     %s              Label the top image
520
521       Color management:
522
523              --colorconfig
524                     %s        Explicitly specify an OCIO configuration file
525
526              --iscolorspace
527                     %s       Set the assumed color  space  (without  altering
528                     pixels)
529
530              --tocolorspace
531                     %s        Convert  the  current image's pixels to a named
532                     color space
533
534              --colorconvert
535                     %s %s    Convert pixels from 'src' to 'dst'  color  space
536                     (options: key=, value=)
537
538              --ociolook
539                     %s            Apply  the named OCIO look (options: from=,
540                     to=, inverse=, key=, value=)
541
542              --ociodisplay
543                     %s %s     Apply the named OCIO display and view (options:
544                     from=, looks=, key=, value=)
545
546              --ociofiletransform
547                     %s    Apply   the   named  OCIO  filetransform  (options:
548                     inverse=)
549
550              --unpremult
551                     Divide all color channels of the  current  image  by  the
552                     alpha to "un-premultiply"
553
554              --premult
555                     Multiply  all  color channels of the current image by the
556                     alpha
557
558              Input formats supported: bmp, cineon, dds, dicom, dpx,  field3d,
559              fits,  gif,  hdr,  ico,  iff, jpeg, jpeg2000, openexr, png, pnm,
560              psd, raw, rla, sgi, socket, softimage, targa, tiff, webp, zfile
561
562              Output formats supported: bmp, dpx,  field3d,  fits,  gif,  hdr,
563              ico,  iff,  jpeg, jpeg2000, openexr, png, pnm, rla, sgi, socket,
564              targa, tiff, webp, zfile
565
566              Known color spaces: "linear", "sRGB", "Rec709"
567
568              Dependent libraries: dcmtk 3.6.2, Field3d 1.7.2, gif_lib  5.1.4,
569              jpeg-turbo  2.0.0, OpenJpeg 2.3.0, OpenEXR 2.2.0, libpng 1.6.34,
570              libraw 0.19.0-Release, LIBTIFF, Version 4.0.9, Webp 1.0.0
571
572
573
574                               02 November 2018                    oiiotool(1)
Impressum