Convert the rest of ImageBufAlgo to use KWArgs where helpful

Abierto
#4,160 0 comentarios 0 reacciones 0 asignados Ver en GitHub

Los mantenedores suelen responder en 3 días

Nadie ha tomado este issue todavía.

Evaluación

Dificultad
5/5
Tiempo estimado
Más de una semana
Aptitud para principiantes
35/100
Tipo de issue
Refactorización
Claridad
Bastante claro
Estado de actividad
Estancado
Stack tecnológico
cpp

Línea de trabajo

Comienza con el enfoque KWArgs prototipado en PR #1449 y revisa las funciones de ImageBufAlgo, incluida rotate(), para identificar qué parámetros son fundamentales y cuáles opcionales. Define el enfoque de compatibilidad en torno al encabezado propuesto imagebufalgo_legacy.h. Se considera terminado cuando las funciones IBA adecuadas usan KWArgs, mientras que la compatibilidad de código fuente obsoleta sigue disponible mediante el encabezado heredado.

Escrito por el modelo de indexación a partir del texto del issue.

Descripción

core APIs image processing roadmap

#1449 prototypes a new approach to handling the shifting sets of optional parameters to ImageBufAlgo functions. Assuming we like this, we should look for other IBA functions that could use this conversion.

An important part of this is making the correct judgment call about which parameters to an IBA function are fundamental, and should therefore be explicit and required, versus which are optional, special purpose, or can almost always be adequately covered by a default. For example, for rotate(), the angle to rotate is required and should be explicit, but the parameters controlling the reconstruction filter are for most uses and most users find to be defaulted, and so those should be passed among the keyword options.

Because this will be a hard incompatibility at the source level, I recommend that rather than deleting them outright, we put the old (now deprecated) functions in an optional header imagebufalgo_legacy.h. There, they can be defined as inline functions that call the new KWArgs versions. This way, if not convenient at this time for a user to change all of their use of IBA, they can just add a #include <OpenImageIO/imagebufalgo_legacy.h> and get the old definitions. For now. We will eventually remove it for real. By being inline, removing them later will not create a future ABI break.

Lenguaje dominante
C++
Estrellas
2.4k
Forks
727
Merge medio
4 d 8 h
PR fusionados (30 d)
67

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.