Skip to content

Commit

Permalink
[docs] Add an oiiotool example of putting a border around an image (A…
Browse files Browse the repository at this point in the history
  • Loading branch information
lgritz committed Oct 22, 2021
1 parent 3fee6a7 commit 2f9d197
Showing 1 changed file with 11 additions and 2 deletions.
13 changes: 11 additions & 2 deletions src/doc/oiiotool.rst
Original file line number Diff line number Diff line change
Expand Up @@ -512,8 +512,8 @@ Add other arbitrary metadata::



Changing image boundaries
-------------------------
Changing image boundaries and borders
-------------------------------------

Change the origin of the pixel data window::

Expand All @@ -540,6 +540,15 @@ and setting the display window to the new pixel data window::

oiiotool in.exr --cut 128x128+900+300 -o out.exr

Put a constant-color border around all sides of an image, without needing to
know the resolution of the input image::

# BW: Border width
BW=40
COLOR=.2,.2,.2,1.0
oiiotool in.tif \
--pattern constant:color=$COLOR "{TOP.width+2*$BW}x{TOP.height+2*$BW}" "{TOP.nchannels}" --paste "+$BW+$BW" \
-o out.tif


Scale the values in an image
Expand Down

0 comments on commit 2f9d197

Please sign in to comment.