AcademySoftwareFoundation / AcademySoftwareFoundation/OpenImageIO

[BUG] When using ImageBuf, this file reports a divide-by-zero exception error. Please take a look

Open
#4,185 2 comments 0 reactions 0 assignees View on GitHub
bug difficulty/easy help wanted texture / image cache
Dominant language
C++
Stars
2.4k
Forks
698
Avg merge
2d 23h
Merged PRs (30d)
46

Description

**Describe the bug**

When using ImageBuf, this file reports a divide-by-zero exception error. Please take a look
This is a sample file.
[XPPen_new_logo.zip](https://github.com/AcademySoftwareFoundation/OpenImageIO/files/14567847/XPPen_new_logo.zip)

**OpenImageIO version and dependencies**
v2.4.13.0

**To Reproduce**

Execute the following code:
```
ImageCache *cache = ImageCache::create ()
auto inp = ImageBuf(path, cache);
if (inp.has_error()) {
std::cout << "parser: open image error: " << inp.geterror() << std::endl;
return nullptr;
}
```

**Evidence**
![373c84ac874a40132f3c7c566b4fb2c](https://github.com/AcademySoftwareFoundation/OpenImageIO/assets/42990446/324718f8-3203-4985-8696-fcf795bedf58)

Contributor guide

Open the contributing guide

Research direction

Reproduce the failure with the attached XPPen_new_logo.zip using the ImageCache and ImageBuf snippet in the issue. Start by tracing the ImageBuf construction and the reported divide-by-zero error in OpenImageIO v2.4.13.0. Done means the sample no longer produces the divide-by-zero exception and image-open errors remain appropriately reported.

Written by the indexing model from the issue text.

Assessment

Tech stack
cpp
Domain
computer-graphics
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.