forked from AcademySoftwareFoundation/OpenImageIO
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix(iinfo): iinfo was not reading MIP levels correctly (AcademySoftwa…
…reFoundation#4498) A logical error was causing us to not correctly cycle through the successive MIP levels. Somehow, we missed this all these years. You can tell that there was something wrong all along by examining the testsuite/iinfo test output (which we have updated here) -- in the old/wrong one, the statistics "FiniteCount" suspiciously stayed the same for all MIP levels, which is clearly wrong. Now you can see that it does correctly reflect the reduced resolution of each MIP level. This bug was limited to 'iinfo' itself. There wasn't any inherent problem with reading MIP levels directly with ImageInput or ImageBuf. The line with the bug has been unchanged for 14 years! We were trying to be clever about not double-reading, except that the only context in which this was called, that would never have happened anyway, so that cleverness (which was incorrectly implemented) was unnecessary. Signed-off-by: Larry Gritz <[email protected]>
- Loading branch information
Showing
4 changed files
with
94 additions
and
98 deletions.
There are no files selected for viewing
This file contains 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
This file contains 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
This file contains 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
This file contains 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