AcademySoftwareFoundation / AcademySoftwareFoundation/OpenImageIO
[BUG] ImageBuf::nmiplevels() returns 0
- Dominant language
- C++
- Stars
- 2.4k
- Forks
- 698
- Avg merge
- 3d 4h
- Merged PRs (30d)
- 47
Description
OpenImageIO 3.1.14.0
Only cached version of ImageBuf object returns correct number of mipmaps.
```
buffer = ImageBuf(imageFileName, subimage, mip, cache);
nmips = buffer.nmiplevels(); // Works as expected
```
```
buffer = ImageBuf(imageFileName, subimage, mip);
nmips = buffer.nmiplevels(); // Always returns zero
```
Same for both exr and tiff backends.
Could be the same issue: https://github.com/AcademySoftwareFoundation/OpenImageIO/discussions/4984
Contributor guide
Research direction
Start by reproducing the issue with the cached and uncached ImageBuf constructors, using both EXR and TIFF inputs, and compare their nmiplevels() results. Trace the ImageBuf::nmiplevels() entry point and the constructor paths, then verify that both forms report the correct mipmap count.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- cpp
- Domain
- computer-graphics
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Active
- Clarity
- Mostly clear
- Newbie friendliness
- 68/100