recognize configured color spaces and report their primaries and gamma
Los mantenedores suelen responder en 1 día
Evaluación
- Dificultad
- 5/5
- Tiempo estimado
- Más de una semana
- Aptitud para principiantes
- 25/100
- Tipo de issue
- Nueva funcionalidad
- Claridad
- Bastante claro
- Estado de actividad
- Estancado
- Área
- computer-graphics
Línea de trabajo
Start by reviewing the proposed ColorSpaceInfo surface and the ColorConfig::get_color_space_info() and derive_color_space_info() entry points. Trace how the PNG, OpenEXR, HEIF/AVIF, JPEG XL, DPX, RLA and Targa writers consume the result; done means conservative recognition and the specified query and writer behavior, without guessing unavailable properties.
Escrito por el modelo de indexación a partir del texto del issue.
Descripción
OpenImageIO carries a color space name, but a writer cannot ask what that name
means. PNG, OpenEXR and JPEG XL can store primaries, a transfer function or a
color interop ID,
yet their writers recognize only a short list of spellings, and OCIO configs
often rename standard color spaces or declare no color interop ID.
This covers the #4980 items "Handle more interop IDs through custom primaries,
white point and gamma" and "Changes needed for namespaced interop IDs"
(background in #4787). An upcoming PR implements it.
Proposal
- Add an immutable, owning
ColorSpaceInfo(C++ and Python) with
independently optional RGBW chromaticities andtransfer_function_gamma():
the exponent of a pure-power transfer, 1.0 for linear, 0 otherwise. The
sRGB curve is piecewise, so it reports 0 rather than an approximation. ColorConfig::get_color_space_info()returns only what is already known.
ColorConfig::derive_color_space_info()may also compare the space's
transforms with a built-in interop-identities config. The comparison is
bounded, and its results, including completed misses, are reused for the
rest of the process. A property that cannot be established stays
unavailable; it is never guessed from a name. A linear encoding the config
declares is honored.- Identify configured color spaces by comparing transforms, not spellings. A
declared color interop ID stays authoritative, and a measured match is
reported as derived. Configured names, aliases, roles and data flags keep
precedence. Namespaced names resolve as the color interop ID
recommendation describes. - Writers use the result conservatively:
- OpenEXR may publish a derived ID, including namespaced
oiio:IDs and
theocio:IDs OpenColorIO publishes. The color interop ID and
OpenEXR
recommendations both allow namespaced IDs. - PNG, HEIF/AVIF and JPEG XL can infer CICP from a derived ID.
- PNG keeps ICC, sRGB and cICP first. A color space with no CICP code gets
cHRMbesidegAMAwhen its primaries and pure-power transfer are
known. libPNG before 1.6.44 rejects some valid chromaticities (ACEScg's
red, for example), and that rejection would abort the write, so the
writer first tests them on a scratch libPNG structure.gAMAalone is
written only for a Rec.709 gamma, or for a linear space whose primaries
are unknown or cannot be stored. A non-linear transfer on non-Rec.709
primaries that cannot be stored gets no color chunk. With
OPENIMAGEIO_DEBUGset, the writer reports what it dropped. - DPX, RLA and Targa write gamma 1 for any linear color space. They never
write a non-Rec.709 non-linear gamma, because they cannot also write the
primaries.
- OpenEXR may publish a derived ID, including namespaced
Behavior this changes
- Writers can tag color spaces whose config declares no color interop ID.
- ACES2065-1, linear P3-D65, Rec.2020 and AdobeRGB, and camera linear gamuts
now write gamma 1 in DPX, RLA and Targa. Those files read back as
lin_rec709_scene, where they read back untagged before, because those
formats carry no primaries that OpenImageIO reads. resolve(),equivalent(),getColorSpaceIndex()and
isColorSpaceActive()also answer for recognized color interop IDs and
namespaced names.- CICP 12/17 (P3-D65 with the SMPTE ST 428-1 transfer) now reads as
dcdm_p3d65_display, and plain gamma 2.6 P3-D65 no longer writes it. - The first query that needs identification can be noticeably slower on a
large config. Later queries, including from otherColorConfigobjects,
reuse the results, whichColorConfig::reset()does not clear. With #5507,
opening a file does not make this query. - The PNG reader does not change here. It still reads
gAMAas a Rec.709
gamma and ignorescHRM, so a PNG written from P3-D65 gamma 2.6 reads back
asg26_rec709_sceneuntil a later change (an upcoming PR) reads those
chunks.
Questions for maintainers
- Is
ColorSpaceInfo(valid(),chromaticities(),
transfer_function_gamma()) the right minimal public surface? The other
facts it derives stay private for now. - Is the split clear enough between the cheap
get_color_space_info()and
the measuringderive_color_space_info()? - Should OpenEXR write derived namespaced IDs (
oiio:,ocio:) 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 6 h
- PR fusionados (30 d)
- 89
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 2/5 1-3 horas Aptitud para principiantes 69/100
AcademySoftwareFoundation/OpenImageIO#5638 ·
Los mantenedores suelen responder en 1 día
-
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
-
define which color metadata OpenImageIO trusts, and when it resolves itPosiblemente 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 20/100
AcademySoftwareFoundation/OpenImageIO#5516 ·
Los mantenedores suelen responder en 1 día
Todos los issues de AcademySoftwareFoundation/OpenImageIO
Issues similares
-
Dificultad 2/5 1-3 horas Aptitud para principiantes 78/100
Los mantenedores suelen responder en 4 días
-
Dificultad 2/5 1-3 horas Aptitud para principiantes 72/100
elf-alchemist/elfbsp#113 ·
Los mantenedores suelen responder en 1 día
-
Dificultad 2/5 1-3 horas Aptitud para principiantes 75/100
patrick-hudson/put.gd-desktop#979 · 1 comentario ·
Los mantenedores suelen responder en 1 día
-
Dificultad 2/5 1-3 horas Aptitud para principiantes 76/100
Dao-AILab/flash-attention#3097 ·
Los mantenedores suelen responder en 3 días
-
Dificultad 2/5 1-3 horas Aptitud para principiantes 85/100
Niko1221/Strata#4779 · 2 comentarios ·
Los mantenedores suelen responder en 3 días