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: attribute actions get subimage controls #3384

Merged
merged 1 commit into from
Apr 21, 2022

Conversation

lgritz
Copy link
Collaborator

@lgritz lgritz commented Apr 11, 2022

I realized that --attrib (and several related actions) only set the
attribute as directed for the first subimage if it's a multi-image
file (such as a multi-part exr), or all of them if the -a flag is
used. But there was no ability to set it for a particular (non-first)
subimage, like many other oiiotool actions have the ability to do.

So in this patch, I refactor the following commands to use the
OiiotoolOp and related macros, which automatically make it responsive
to the :subimages= optional modifiers:

--attrib
--sattrib
--eraseattrib
--caption
--orientation
--clear-keywords
--iscolorspace

As a bonus aside, one thing this lets you do is set a different
compression method per-subimage using, e.g.,
--attrib compression:subimage=3 dwaa:100.
But if you set compression with --attrib compression, do not also
use --compression, which will override it and also apply to all
subimages.

I realized that --attrib (and several related actions) only set the
attribute as directed for the first subimage if it's a multi-image
file (such as a multi-part exr), or all of them if the -a flag is
used.  But there was no ability to set it for a particular (non-first)
subimage, like many other oiiotool actions have the ability to do.

So in this patch, I refactor the following commands to use the
OiiotoolOp and related macros, which automatically make it responsive
to the `:subimages=` optional modifiers:

    --attrib
    --sattrib
    --eraseattrib
    --caption
    --orientation
    --clear-keywords
    --iscolorspace

As a bonus aside, one thing this lets you do is set a different
compression method per-subimage using, e.g.,
`--attrib compression:subimage=3 dwaa:100`.
But if you set compression with `--attrib compression`, do not also
use `--compression`, which will override it and also apply to all
subimages.
@lgritz lgritz merged commit 965cf04 into AcademySoftwareFoundation:master Apr 21, 2022
@lgritz lgritz deleted the lg-attrib branch April 24, 2022 07:38
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.

1 participant