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

api: deprecation cleanup in imageio.h #4312

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

lgritz
Copy link
Collaborator

@lgritz lgritz commented Jun 24, 2024

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 old delete 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.

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
deprected 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 old `delete`
  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.

Signed-off-by: Larry Gritz <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

1 participant