Hacktoberfest 2026: los issues que los mantenedores marcaron para octubre, abiertos y aptos para principiantes. Explorar issues de Hacktoberfest

recognize configured color spaces and report their primaries and gamma

Abierto
#5,514 0 comentarios 0 reacciones 0 asignados Ver en GitHub

Los mantenedores suelen responder en 1 día

@zachlewis ya está trabajando en esto.

Desde el 28/9/2026.

  • #5518 de @zachlewis — abierto

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
Stack tecnológico
cpp, python

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

  1. Add an immutable, owning ColorSpaceInfo (C++ and Python) with
    independently optional RGBW chromaticities and transfer_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.
  2. 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.
  3. 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.
  4. Writers use the result conservatively:
    • OpenEXR may publish a derived ID, including namespaced oiio: IDs and
      the ocio: 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
      cHRM beside gAMA when 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. gAMA alone 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_DEBUG set, 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.

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 other ColorConfig objects,
    reuse the results, which ColorConfig::reset() does not clear. With #5507,
    opening a file does not make this query.
  • The PNG reader does not change here. It still reads gAMA as a Rec.709
    gamma and ignores cHRM, so a PNG written from P3-D65 gamma 2.6 reads back
    as g26_rec709_scene until a later change (an upcoming PR) reads those
    chunks.

Questions for maintainers

  1. Is ColorSpaceInfo (valid(), chromaticities(),
    transfer_function_gamma()) the right minimal public surface? The other
    facts it derives stay private for now.
  2. Is the split clear enough between the cheap get_color_space_info() and
    the measuring derive_color_space_info()?
  3. 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

Primeros pasos

  1. Lee el issue completo y luego la guía de contribución del proyecto.
  2. Comenta en el issue que vas a ocuparte — evita que dos personas hagan lo mismo.
  3. Haz un fork del repositorio y trabaja en una rama.
  4. Abre un pull request que haga referencia al número del issue.

Más de AcademySoftwareFoundation/OpenImageIO

Todos los issues de AcademySoftwareFoundation/OpenImageIO

Issues similares

Más issues de C++

Recibe los nuevos issues en tu correo

Un resumen breve de issues de GitHub para principiantes.