api: deprecation cleanup in imageio.h #4312
Open
+216
−228
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Track down and fix many places internal to OIIO where we were still using deprecated API calls.
Add deprecation warnings to some things that have been nominally deprecated, but weren't already tagged as such.
Guard deprecated things behind OIIO_DISABLE_DEPRECATED so that downstream projects can hide them to help them find and change any use of the deprecated calls, and behind !defined(OIIO_INTERNAL) so they are hidden from the rest of the internals of our code base.
Make some of the deprecated things inline, so that their final removal later doesn't constitute a link ABI compatibility change. (We do absorb an ABI compatibility boundary with this PR, so I've bumped the version number appropriately.) Move all the OIIO-namespace level deprecated items to the end of imageio.h so they're as out of the way as possible.
A lot of the things that are still present here, just guarded by the deprecation warnings, will be removed entirely before the final OIIO 3.0 release.
Please note some particular things in imageio that have been deprecated for a while and that we expect to disappear entirely by 3.0:
The old style
ImageInput::read_*
functions that don't take explicit subimage and miplevel paramters, because they aren't thread-safe due to their implied statefulness. You are expected to use the ones that take those parameters and are stateless.The variety of seek_subimage that takes an
ImageSpec&
to fill in.Some obsolete varieties of ImageInput and ImageOutput create() static methods.
The
destroy
methods that are no longer needed (plain olddelete
is fine).The various error-setting functions that use the old printf-like formatting conventions. Use
errorfmt()
and friends that use the std::format conventions.