-
Notifications
You must be signed in to change notification settings - Fork 630
oiiotool: -i:native=1, fix --native behavior, fix convert datatype #4708
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
Merged
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
A constellation of closely related fixes and additions related to oiiotool `-i` behavior: * When using `-i:now=1` to force for immediate read rather than using an ImageCache, it would "forget" any prior setting of `--native`. This is fixed now to correctly combine desire for bypassing the cache with hinting to maintain native data type. * When restricting channel subset with `-i:ch=...`, use of the `--native` flag was incorrect in some cases -- it would use the overall best single data format of all channels, rather than restricting that to the selected channel range. So, for example, if you said `-i:ch=R,G,B,A` and those channels were all `half`, but channel 17 (not selected) was `float`, you would get a conversion to float rather than keeping the selected channels at their native half. The solution here is that the type chosen for `--native` behavior should only consider the selected channel subset, not all channels. * Add a new `-i` modifier: `:native=1`, allowing you to select the "native" behavior on a per-input-file basis (the existing `--native` command sets the default). Signed-off-by: Larry Gritz <[email protected]>
Any comments? This has been posted for a week now. |
Over 2 weeks in review, no objections -> merging |
lgritz
added a commit
to lgritz/OpenImageIO
that referenced
this pull request
May 9, 2025
…cademySoftwareFoundation#4708) A constellation of closely related fixes and additions related to oiiotool `-i` behavior: * When using `-i:now=1` to force for immediate read rather than using an ImageCache, it would "forget" any prior setting of `--native`. This is fixed now to correctly combine desire for bypassing the cache with hinting to maintain native data type. * When restricting channel subset with `-i:ch=...`, use of the `--native` flag was incorrect in some cases -- it would use the overall best single data format of all channels, rather than restricting that to the selected channel range. So, for example, if you said `-i:ch=R,G,B,A` and those channels were all `half`, but channel 17 (not selected) was `float`, you would get a conversion to float rather than keeping the selected channels at their native half. The solution here is that the type chosen for `--native` behavior should only consider the selected channel subset, not all channels. * Add a new `-i` modifier: `:native=1`, allowing you to select the "native" behavior on a per-input-file basis (the existing `--native` command sets the default). Signed-off-by: Larry Gritz <[email protected]>
scott-wilson
pushed a commit
to scott-wilson/OpenImageIO
that referenced
this pull request
May 17, 2025
…cademySoftwareFoundation#4708) A constellation of closely related fixes and additions related to oiiotool `-i` behavior: * When using `-i:now=1` to force for immediate read rather than using an ImageCache, it would "forget" any prior setting of `--native`. This is fixed now to correctly combine desire for bypassing the cache with hinting to maintain native data type. * When restricting channel subset with `-i:ch=...`, use of the `--native` flag was incorrect in some cases -- it would use the overall best single data format of all channels, rather than restricting that to the selected channel range. So, for example, if you said `-i:ch=R,G,B,A` and those channels were all `half`, but channel 17 (not selected) was `float`, you would get a conversion to float rather than keeping the selected channels at their native half. The solution here is that the type chosen for `--native` behavior should only consider the selected channel subset, not all channels. * Add a new `-i` modifier: `:native=1`, allowing you to select the "native" behavior on a per-input-file basis (the existing `--native` command sets the default). Signed-off-by: Larry Gritz <[email protected]> Signed-off-by: Scott Wilson <[email protected]>
scott-wilson
pushed a commit
to scott-wilson/OpenImageIO
that referenced
this pull request
May 18, 2025
…cademySoftwareFoundation#4708) A constellation of closely related fixes and additions related to oiiotool `-i` behavior: * When using `-i:now=1` to force for immediate read rather than using an ImageCache, it would "forget" any prior setting of `--native`. This is fixed now to correctly combine desire for bypassing the cache with hinting to maintain native data type. * When restricting channel subset with `-i:ch=...`, use of the `--native` flag was incorrect in some cases -- it would use the overall best single data format of all channels, rather than restricting that to the selected channel range. So, for example, if you said `-i:ch=R,G,B,A` and those channels were all `half`, but channel 17 (not selected) was `float`, you would get a conversion to float rather than keeping the selected channels at their native half. The solution here is that the type chosen for `--native` behavior should only consider the selected channel subset, not all channels. * Add a new `-i` modifier: `:native=1`, allowing you to select the "native" behavior on a per-input-file basis (the existing `--native` command sets the default). Signed-off-by: Larry Gritz <[email protected]> Signed-off-by: Scott Wilson <[email protected]>
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
A constellation of closely related fixes and additions related to oiiotool
-i
behavior:When using
-i:now=1
to force for immediate read rather than using an ImageCache, it would "forget" any prior setting of--native
. This is fixed now to correctly combine desire for bypassing the cache with hinting to maintain native data type.When restricting channel subset with
-i:ch=...
, use of the--native
flag was incorrect in some cases -- it would use the overall best single data format of all channels, rather than restricting that to the selected channel range. So, for example, if you said-i:ch=R,G,B,A
and those channels were allhalf
, but channel 17 (not selected) wasfloat
, you would get a conversion to float rather than keeping the selected channels at their native half. The solution here is that the type chosen for--native
behavior should only consider the selected channel subset, not all channels.Add a new
-i
modifier::native=1
, allowing you to select the "native" behavior on a per-input-file basis (the existing--native
command sets the default).