Commit 36f7c15
authored
oiiotool: -i:native=1, fix --native behavior, fix convert datatype (#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 <lg@larrygritz.com>1 parent 0e71adb commit 36f7c15
3 files changed
Lines changed: 23 additions & 7 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1180 | 1180 | | |
1181 | 1181 | | |
1182 | 1182 | | |
| 1183 | + | |
| 1184 | + | |
| 1185 | + | |
| 1186 | + | |
1183 | 1187 | | |
1184 | | - | |
| 1188 | + | |
| 1189 | + | |
1185 | 1190 | | |
1186 | 1191 | | |
1187 | 1192 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
335 | 335 | | |
336 | 336 | | |
337 | 337 | | |
338 | | - | |
339 | | - | |
| 338 | + | |
| 339 | + | |
| 340 | + | |
| 341 | + | |
| 342 | + | |
| 343 | + | |
| 344 | + | |
| 345 | + | |
| 346 | + | |
| 347 | + | |
340 | 348 | | |
341 | 349 | | |
342 | 350 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
5176 | 5176 | | |
5177 | 5177 | | |
5178 | 5178 | | |
| 5179 | + | |
5179 | 5180 | | |
5180 | 5181 | | |
5181 | 5182 | | |
| |||
5261 | 5262 | | |
5262 | 5263 | | |
5263 | 5264 | | |
| 5265 | + | |
5264 | 5266 | | |
5265 | 5267 | | |
5266 | 5268 | | |
| |||
5273 | 5275 | | |
5274 | 5276 | | |
5275 | 5277 | | |
5276 | | - | |
5277 | | - | |
5278 | | - | |
| 5278 | + | |
| 5279 | + | |
| 5280 | + | |
| 5281 | + | |
5279 | 5282 | | |
5280 | 5283 | | |
5281 | 5284 | | |
| |||
6561 | 6564 | | |
6562 | 6565 | | |
6563 | 6566 | | |
6564 | | - | |
| 6567 | + | |
6565 | 6568 | | |
6566 | 6569 | | |
6567 | 6570 | | |
| |||
0 commit comments