define which color metadata OpenImageIO trusts, and when it resolves it
メンテナーはふだん 1 日以内に返信
評価
- 難易度
- 5/5
- 見積もり時間
- 1週間以上
- 初心者へのやさしさ
- 20/100
- issue の種類
- 機能追加
- 明瞭さ
- 説明が足りない
- 活発さ
- 活発
- 技術スタック
- cpp
調査の方向性
Start with #5507, #5514, and #5422, then trace the PNG reader, set_colorspace(), colorconvert, ociolook, ociodisplay, FLIP, and oiiotool entry points named in the proposal. Done means the agreed evidence precedence, assignment semantics, conversion cleanup, multipart OpenEXR behavior, and listed oiiotool follow-ups are implemented consistently; the maintainer questions still need decisions.
索引モデルが issue の本文から書いたものです。
説明
OpenImageIO makes color-space decisions in readers, in conversions and in
explicit assignment. These paths can read the same file differently, or leave
source metadata beside a destination label, so an image can end up making a
color-space claim its file does not support.
This covers the #4980 items "Refactor reading color space metadata to share
logic", "Deferred and unified resolution of color interop ID from metadata",
"Read cicpTag from ICC profile" and "Determine interop ID from ICC profile
by comparing OCIO transforms". It builds on #5507 and #5514, and extends
the multipart OpenEXR handling from #5422. Related discussions: #3114
(converting from an embedded ICC profile) and #5134 (stale ACES container
metadata after assignment). Upcoming PRs implement it.
Proposal
-
Readers record file facts; callers resolve them. #5507 stops readers
from consulting a color config. Building on that, the PNG reader parses
cICP,sRGB,gAMAandcHRMitself, because libPNG before 1.6.47
rewrites or drops some of them while reading (and before 1.6.45 ignores
cICP).gAMAalone is recorded asoiio:Gammawith no label, since it
states no primaries.gAMAwith Rec.709cHRMkeeps the Rec.709-gamma
label; ansRGBchunk, or no color chunk at all, still means sRGB. A file's
owncolorInteropIDofunknownis kept as evidence, not as a label. -
set_colorspace()is an assertion.set_colorspace(name)makes the name or
color interop ID
authoritative, even when it is already the label. Other color attributes
are kept if they agree, rewritten if the name determines them, and
removed otherwise (includingacesImageContainerFlag).set_colorspace("")erases only the label; the evidence stays.set_colorspace()with no argument sets an unset label from the
evidence, and only to a configured color space or a color interop ID.set_colorspace("unknown")states that nothing is known and removes the
other evidence.
-
One evidence order: explicit assignment; the ACES container flag;
colorInteropID; cICP; a supported RGB matrix/TRC ICC profile; the PNG
sRGBchunk; numeric metadata (PNGgAMAwith or withoutcHRM, OpenEXR
chromaticities); the reader's label; a caller's failover. oiiotool can
also consult OCIO FileRules, either first or just before the reader's
label. PNGgAMAalone selects the first configured space with that
transfer, display-referred spaces first, and assumes its primaries. For a
conversion, an ICC profile or complete numeric metadata that matches no
known encoding gets a process-local conversion endpoint (<synthetic>...);
unmatchedgAMAalone gets one for its transfer only. That endpoint is never stored as a label or written as acolorInteropID.
LUT-based ICC profiles make no claim. -
One resolver for every implicit source:
colorconvert,ociolook,
ociodisplay, FLIP, oiiotool--autocc, and terminal output. It runs
under the caller's config and effective OCIO context, the same ones the
processor uses. Metadata that was stated but cannot be used resolves to
unknown, never to linear, unless the config defines a space named
unknown. After a conversion, source-encoding metadata is removed and the
result is tagged with its destination, including acolorInteropID. That
ID isunknownwhen there is no single portable destination, such as a
partial region or a context override. -
OpenEXR. A part's own
colorInteropIDwins. An ID a later part
inherits from part 0 (#5422) is only a label, so that part's own ICC
profile or chromaticities can outrank it. An inheritedunknownstays
evidence, and strict multipart validation treatsunknownlike a missing
ID. Writers treat chromaticities as a claim of linear encoding. They drop
chromaticities that contradict the header's ID; with no ID, they keep them
only besideoiio:Gamma1, and otherwise writecolorInteropIDunknown.
Chromaticities that agree with a linearcolorInteropIDare still written
beside it. This is a deliberate, temporary departure from the
OpenEXR recommendation,
which advises against writing both, so that readers have time to adopt
colorInteropID. A future change will stop writing them by default.
Smaller follow-ups covered by this issue
oiiotool --runstatsprints color cache statistics (retained entries, ICC
bytes, cold-work counters) when the run built a color config.oiiotool --colorspacesearchlists configured color spaces that match
requested primaries, measured transfer, encoding or scene/display use,
without needing an image. Its property display separates an authored
declared-linearfrom a transfer measured to be linear.oiiotool --colortransferprints a color space's exact encoding transfer
function as CTF, CLF or OCIO syntax, under the effective OCIO context. It
reports an error when the curve cannot be stated exactly, rather than
approximating it.
Behavior this changes
- Asserting the current label again now reconciles the metadata; before, it
changed nothing. - A PNG with only
gAMAis no longer labeled as a Rec.709 gamma. Non-Rec.709
cHRMwithgAMAcan now identify a configured source. colorconvertandociodisplaywith an empty orcurrentsource used
scene_linear. Now they resolve the image's metadata, and for an image that
states nothing they follow the config (its default file rule, then its
defaultrole, orunknownunder strict parsing).ociolook, FLIP and terminal output still treat a
completely silent image asscene_linear.--autoccstill leaves silent
inputs unconverted by default.colorconvertcan convert from a supported (RGB matrix/TRC) embedded ICC
profile.- A later OpenEXR part's own evidence can override an inherited label.
- Converted images no longer carry the source's chromaticities.
Questions for maintainers
- Are the assertion semantics right, including
""versus no argument, and
"unknown"as an assertion versus a file'sunknownas evidence? - For multipart OpenEXR, should an inherited ID stay a weak label, or be
represented separately? - Is keeping chromaticities beside an agreeing linear
colorInteropIDthe
right transition, and when should the default flip? - Should process-local endpoints for unmatched ICC and numeric metadata be
on by default?
Assisted-by: OpenAI Codex (GPT-5.6 Sol)
Assisted-by: Claude Code / Claude Opus 5.5
- 主要言語
- C++
- スター
- 2.4k
- フォーク
- 716
- 平均マージ
- 2日 6時間
- マージ済み PR(30日)
- 89
環境構築
- Dockerfile・Docker Compose ファイルなし
- プルリクエストのテンプレートあり
- コントリビューションガイドを読む
はじめの一歩
- issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
- 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
- リポジトリをフォークし、ブランチを切って変更します。
- issue 番号を参照したプルリクエストを送ります。
AcademySoftwareFoundation/OpenImageIO のほかの issue
-
難易度 2/5 1〜3時間 初心者へのやさしさ 69/100
AcademySoftwareFoundation/OpenImageIO#5638 ·
メンテナーはふだん 1 日以内に返信
-
難易度 5/5 1週間以上 初心者へのやさしさ 35/100
AcademySoftwareFoundation/OpenImageIO#5619 · コメント 2 件 ·
メンテナーはふだん 1 日以内に返信
-
難易度 5/5 1週間以上 初心者へのやさしさ 10/100
AcademySoftwareFoundation/OpenImageIO#5570 ·
メンテナーはふだん 1 日以内に返信
-
難易度 5/5 1週間以上 初心者へのやさしさ 35/100
AcademySoftwareFoundation/OpenImageIO#5558 ·
メンテナーはふだん 1 日以内に返信
-
recognize configured color spaces and report their primaries and gamma対応中かも このイシューにリンクされたプルリクエストがオープン中、またはマージ済みです。 オープン
難易度 5/5 1週間以上 初心者へのやさしさ 25/100
AcademySoftwareFoundation/OpenImageIO#5514 ·
メンテナーはふだん 1 日以内に返信
AcademySoftwareFoundation/OpenImageIO の issue をすべて見る
似ている issue
-
難易度 1/5 1時間未満 初心者へのやさしさ 85/100
objectionary/game-of-life#74 ·
-
bug fmt low priority
難易度 2/5 1〜3時間 初心者へのやさしさ 82/100
メンテナーはふだん 1 日以内に返信
-
難易度 2/5 1〜3時間 初心者へのやさしさ 68/100
qbittorrent/qBittorrent#25176 ·
メンテナーはふだん 2 日以内に返信
-
難易度 1/5 1時間未満 初心者へのやさしさ 85/100
lxqt/lxqt-powermanagement#500 · コメント 1 件 ·
-
難易度 2/5 1〜3時間 初心者へのやさしさ 65/100
scp-fs2open/fs2open.github.com#7965 ·
メンテナーはふだん 1 日以内に返信