Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[docs] Add an oiiotool example of putting a border around an image #3138

Merged
merged 1 commit into from
Oct 22, 2021
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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