Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Convert the rest of ImageBufAlgo to use KWArgs where helpful #4160

Open
lgritz opened this issue Feb 19, 2024 · 0 comments
Open

Convert the rest of ImageBufAlgo to use KWArgs where helpful #4160

lgritz opened this issue Feb 19, 2024 · 0 comments
Labels
core APIs Affecting public APIs of core functionality classes, such as ImageInput, ImageOutput, ImageBuf. image processing Related to ImageBufAlgo or other image processing topic. roadmap This is a priority item on the roadmap for the next major release.

Comments

@lgritz
Copy link
Collaborator

lgritz commented Feb 19, 2024

#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.

@lgritz lgritz added core APIs Affecting public APIs of core functionality classes, such as ImageInput, ImageOutput, ImageBuf. image processing Related to ImageBufAlgo or other image processing topic. roadmap This is a priority item on the roadmap for the next major release. labels Feb 19, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
core APIs Affecting public APIs of core functionality classes, such as ImageInput, ImageOutput, ImageBuf. image processing Related to ImageBufAlgo or other image processing topic. roadmap This is a priority item on the roadmap for the next major release.
Projects
None yet
Development

No branches or pull requests

1 participant