Skip to content

Commit

Permalink
docs: Fix some typos and add missing oiiotool expression explanations (
Browse files Browse the repository at this point in the history
…AcademySoftwareFoundation#4169)

Signed-off-by: Larry Gritz <lg@larrygritz.com>
  • Loading branch information
lgritz authored Mar 2, 2024
1 parent 758b5a7 commit 2fc8fe9
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 6 deletions.
12 changes: 10 additions & 2 deletions src/doc/oiiotool.rst
Original file line number Diff line number Diff line change
Expand Up @@ -136,8 +136,8 @@ contents of an expression may be any of:
`ImageDescription`, or `width`)
* `filename` : the name of the file (e.g., `foo.tif`)
* `file_extension` : the extension of the file (e.g., `tif`)
* `full_geom` : the "full" or "display" size)
* `geom` : the pixel data size in the form `640x480+0+0`)
* `full_geom` : the "full" or "display" size
* `geom` : the pixel data size in the form `640x480+0+0`
* `nativeformat` : the pixel data type from the file.
* `MINCOLOR` : the minimum value of each channel over the entire image
(channels are comma-separated)
Expand Down Expand Up @@ -221,6 +221,14 @@ contents of an expression may be any of:
retrieved by `OIIO::getattribute(name, ...)`. The `name` may be enclosed
in single or double quotes or be a single unquoted sequence of characters.
(Added in OIIO 2.3.)
* `var(name)` : returns the user variable of the give name. (Added in OIIO
2.4.)
* `eq(a,b)` : returns 1 if `a` is equal to `b`, 0 otherwise. (Added in OIIO
2.4.)
* `neq(a,b)` : returns 1 if `a` is not equal to `b`, 0 otherwise. (Added in
OIIO 2.4.)
* `not(val)` : returns 1 if `val` is a false value, 0 if `val` evaluates
to a true value. (Added in OIIO 2.4.)


To illustrate how this works, consider the following command, which trims
Expand Down
8 changes: 4 additions & 4 deletions src/include/OpenImageIO/imagebufalgo.h
Original file line number Diff line number Diff line change
Expand Up @@ -1763,15 +1763,15 @@ enum NonFiniteFixMode
NONFINITE_BLACK = 1, ///< Replace non-finite values with 0.0.
NONFINITE_BOX3 = 2, ///< Replace non-finite values with the average
///< value of any finite pixels in a 3x3 window.
NONFINITE_ERROR = 100, ///< EReturn false (error), but don't change any
NONFINITE_ERROR = 100, ///< Return false (error), but don't change any
///< values, if any nonfinite values are found.
};

/// `fixNonFinite()` returns in image containing the values of `src` (within
/// the ROI), while repairing any non-finite (NaN/Inf) pixels. If
/// pixelsFixed is not nullptr, store in it the number of pixels that
/// the ROI), while repairing any non-finite (NaN/Inf) pixels. If
/// `pixelsFixed` is not nullptr, store in it the number of pixels that
/// contained non-finite value. It is permissible to operate in-place (with
/// `src` and `dst` referring to the same image).
/// `src` and `dst` referring to the same image).
///
/// How the non-finite values are repaired is specified by one of the `mode`
/// parameter, which is an enum of `NonFiniteFixMode`.
Expand Down

0 comments on commit 2fc8fe9

Please sign in to comment.