AcademySoftwareFoundation / AcademySoftwareFoundation/OpenImageIO

[BUG] Combination of I/O proxies and config image spec

Open
#3,273 0 comments 1 reaction 0 assignees View on GitHub
Dominant language
C++
Stars
2.4k
Forks
698
Avg merge
3d 9h
Merged PRs (30d)
48

Description

... = OIIO::ImageInput::open(extension, nullptr, ioproxy);

works fine. But adding a config spec fails:

OIIO::ImageSpec config;
config["oiio:UnassociatedAlpha"] = 1;
... = OIIO::ImageInput::open(extension, &config, ioproxy);

create() in imageinput.cpp:115 succeeds (and sets the proxy), but open() in imageinput.cpp:119 tries to obtain the proxy again from the config (why?), which does not contain it.

I can set the proxy additionally on the config via

config.attribute("oiio:ioproxy", OIIO::TypeDesc::PTR, &ioproxy);

but this is a bit redundant and cumbersome, in particular figuring out the syntax for that and the "&ioproxy" vs "ioproxy" part. Tested with BMP and GIF.

Contributor guide

Open the contributing guide

Research direction

Start in imageinput.cpp around lines 115-119 and reproduce the failure using the ImageInput::open examples with BMP or GIF. Compare calls with and without the config spec and verify that an I/O proxy supplied to open remains usable without redundantly adding it to the config; the issue is done when both cases work.

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
Stale
Clarity
Mostly clear
Newbie friendliness
45/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.