define which color metadata OpenImageIO trusts, and when it resolves it
Los mantenedores suelen responder en 1 día
Evaluación
- Dificultad
- 5/5
- Tiempo estimado
- Más de una semana
- Aptitud para principiantes
- 20/100
- Tipo de issue
- Nueva funcionalidad
- Claridad
- Necesita aclaración
- Estado de actividad
- Activo
- Stack tecnológico
- cpp
- Área
- computer-graphics
Línea de trabajo
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.
Escrito por el modelo de indexación a partir del texto del issue.
Descripción
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
- Lenguaje dominante
- C++
- Estrellas
- 2.4k
- Forks
- 716
- Merge medio
- 2 d 9 h
- PR fusionados (30 d)
- 91
Preparar el entorno
- Sin Dockerfile ni archivo de Docker Compose
- Tiene una plantilla de pull request
- Leer la guía de contribución
Primeros pasos
- Lee el issue completo y luego la guía de contribución del proyecto.
- Comenta en el issue que vas a ocuparte — evita que dos personas hagan lo mismo.
- Haz un fork del repositorio y trabaja en una rama.
- Abre un pull request que haga referencia al número del issue.
Más de AcademySoftwareFoundation/OpenImageIO
-
Dificultad 5/5 Más de una semana Aptitud para principiantes 35/100
AcademySoftwareFoundation/OpenImageIO#5619 · 2 comentarios ·
Los mantenedores suelen responder en 1 día
-
Dificultad 5/5 Más de una semana Aptitud para principiantes 10/100
AcademySoftwareFoundation/OpenImageIO#5570 ·
Los mantenedores suelen responder en 1 día
-
Dificultad 5/5 Más de una semana Aptitud para principiantes 35/100
AcademySoftwareFoundation/OpenImageIO#5558 ·
Los mantenedores suelen responder en 1 día
-
recognize configured color spaces and report their primaries and gammaPosiblemente ocupada Un pull request vinculado a esta issue está abierto o ya se fusionó. Abierto
Dificultad 5/5 Más de una semana Aptitud para principiantes 25/100
AcademySoftwareFoundation/OpenImageIO#5514 ·
Los mantenedores suelen responder en 1 día
-
Dificultad 5/5 Más de una semana Aptitud para principiantes 35/100
AcademySoftwareFoundation/OpenImageIO#5510 · 1 comentario ·
Los mantenedores suelen responder en 1 día
Todos los issues de AcademySoftwareFoundation/OpenImageIO
Issues similares
-
launch-client --save-creds creates creds/<account>/ with mode 755, not 700Posiblemente ocupada @metis-sprock la tomó hoy. Abiertobacklog bug
Dificultad 2/5 1-3 horas Aptitud para principiantes 74/100
EchoTools/nevr-runtime#1471 ·
Los mantenedores suelen responder en 1 día
-
.NET ep:WebGPU platform:web
Dificultad 2/5 1-3 horas Aptitud para principiantes 76/100
microsoft/onnxruntime#33755 ·
Los mantenedores suelen responder en 2 días
-
Dificultad 2/5 1-3 horas Aptitud para principiantes 78/100
grumpycoders/pcsx-redux#2530 ·
-
A-tools P-medium S-ready-to-start studio task
Dificultad 2/5 1-3 horas Aptitud para principiantes 75/100
Los mantenedores suelen responder en 1 día
-
Status: Needs confirmation Status: Needs triage Type: Code Quality
Dificultad 2/5 1-3 horas Aptitud para principiantes 65/100
Los mantenedores suelen responder en 1 día