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

oiiotool --subimage:delete=1 #2575

Merged
merged 1 commit into from
May 9, 2020

Conversation

lgritz
Copy link
Collaborator

@lgritz lgritz commented May 6, 2020

The existing oiiotool --subimage <n> replaces the top multi-subimage
image with a single specified subimage.

This patch adds an optional modifier, so that --subimage:delete=1
performs the "inverse" operation: removing just the one specified
subimage from the top multi-subimage image.

One way this could be useful is if you want to perform some operation
on just one subimage, but sill leave the others intact. For example,

oiiotool many.exr -subimage 0 -colorconvert foo bar many.exr -subimage:delete=1 0 -siappend -o new.exr

This command loads a multi-image file, extracts just the first image,
applies a color transformation, then loads the file again and deletes
the first image, then appends the two pieces, yielding a new
multi-image file whose first image is the color corrected first
subimage, then unaltered copies of all the other subimages.

Upon adding a test case to testsuite/oiiotool, I noticed that the
existing tests for subimage operations did not have reference output
images, and thus were not being tested after all! Fixed that now.
(Those commands were all working just fine anyway, just didn't have
their tests quite enabled.)

Signed-off-by: Larry Gritz lg@larrygritz.com

The existing `oiiotool --subimage <n>` replaces the top multi-subimage
image with a single specified subimage.

This patch adds an optional modifier, so that `--subimage:delete=1`
performs the "inverse" operation: removing just the one specified
subimage from the top multi-subimage image.

One way this could be useful is if you want to perform some operation
on just one subimage, but sill leave the others intact. For example,

    oiiotool many.exr -subimage 0 -colorconvert foo bar many.exr -subimage:delete=1 0 -siappend -o new.exr

This command loads a multi-image file, extracts just the first image,
applies a color transformation, then loads the file again and deletes
the first image, then appends the two pieces, yielding a new
multi-image file whose first image is the color corrected first
subimage, then unaltered copies of all the other subimages.

Upon adding a test case to testsuite/oiiotool, I noticed that the
existing tests for subimage operations did not have reference output
images, and thus were not being tested after all! Fixed that now.
(Those commands were all working just fine anyway, just didn't have
their tests quite enabled.)

Signed-off-by: Larry Gritz <lg@larrygritz.com>
@lgritz lgritz merged commit 5cc51b5 into AcademySoftwareFoundation:master May 9, 2020
@lgritz lgritz deleted the lg-sidelete branch May 12, 2020 04:58
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

1 participant