Skip to content

Conversation

@lgritz
Copy link
Collaborator

@lgritz lgritz commented Jun 14, 2025

Fix some oiiotool --missingfile behavioral corner cases:

When substituting, warn rather than making a true error. This didn't seem like a big deal for a single command line, but when doing a loop over frames, it would prevent correct behavior from pressing on to the next iteration.

How big is the substitute image? It uses the rez and channels of the first image successfully read (if available). But it when in a frame loop, it resets this on every iteration, so any missing frame looks like it doesn't have a good size guess -- but it does, as long as it's not the first iteration of the loop. This involves safely gettingthe first image dimensions from the parent (each iteration is a child Oiiotool object).

Fix some `oiiotool --missingfile` behavioral corner cases:

When substituting, warn rather than making a true error. This didn't
seem like a big deal for a single command line, but when doing a loop
over frames, it would prevent correct behavior from pressing on to the
next iteration.

How big is the substitute image? It uses the rez and channels of the
first image successfully read (if available). But it when in a frame
loop, it resets this on every iteration, so any missing frame looks
like it doesn't have a good size guess -- but it does, as long as it's
not the first iteration of the loop. This involves safely gettingthe
first image dimensions from the *parent* (each iteration is a child
Oiiotool object).

Signed-off-by: Larry Gritz <[email protected]>
Copy link

@AndreAnjosTD AndreAnjosTD left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Tested the flag --missingfile with command:
oiiotool --parallel-frames --missingfile black -i path/to/sequence/render.#.exr --frames 1001-1200 --framepadding 4 --if "{SUBIMAGES > 1}" --subimage Beauty --endif --tocolorspace sRGB -o path/to/output/render.#.jpg
Our pipe worked with no issues after internal unit tests and production testing. This resolves missing frames as well as pixel reading errors, if used with #4804.

@lgritz lgritz merged commit 5e5e09c into AcademySoftwareFoundation:main Jun 17, 2025
31 checks passed
lgritz added a commit to lgritz/OpenImageIO that referenced this pull request Jun 18, 2025
…tion#4803)

Fix some `oiiotool --missingfile` behavioral corner cases:

When substituting, warn rather than making a true error. This didn't
seem like a big deal for a single command line, but when doing a loop
over frames, it would prevent correct behavior from pressing on to the
next iteration.

How big is the substitute image? It uses the rez and channels of the
first image successfully read (if available). But it when in a frame
loop, it resets this on every iteration, so any missing frame looks like
it doesn't have a good size guess -- but it does, as long as it's not
the first iteration of the loop. This involves safely gettingthe first
image dimensions from the *parent* (each iteration is a child Oiiotool
object).

Signed-off-by: Larry Gritz <[email protected]>
@lgritz lgritz deleted the lg-missingfile branch June 18, 2025 17:34
@lgritz lgritz added the oiiotool oiiotool label Jul 13, 2025
zachlewis pushed a commit to zachlewis/OpenImageIO that referenced this pull request Aug 1, 2025
…tion#4803)

Fix some `oiiotool --missingfile` behavioral corner cases:

When substituting, warn rather than making a true error. This didn't
seem like a big deal for a single command line, but when doing a loop
over frames, it would prevent correct behavior from pressing on to the
next iteration.

How big is the substitute image? It uses the rez and channels of the
first image successfully read (if available). But it when in a frame
loop, it resets this on every iteration, so any missing frame looks like
it doesn't have a good size guess -- but it does, as long as it's not
the first iteration of the loop. This involves safely gettingthe first
image dimensions from the *parent* (each iteration is a child Oiiotool
object).

Signed-off-by: Larry Gritz <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

oiiotool oiiotool

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants