AcademySoftwareFoundation / OpenImageIO

Reading, writing, and processing images in a wide variety of file formats, using a format-agnostic API, aimed at VFX applications.
https://openimageio.readthedocs.org
Apache License 2.0
1.96k stars 596 forks source link

api: remove redundant ImageSpec from ImageCache (issue #4436) #4442

Closed bfraboni closed 3 days ago

bfraboni commented 6 days ago

Description

First draft of frontend changes for issue #4436.

Checklist:

lgritz commented 6 days ago

Other than the comment I made about elaborating the description a bit, this is all looking great to me.

We talked in a different channel about adding back some very minimal inline methods to keep back compatibility for now, so I know that's still on its way, but if that ends up straightforward, we should be able to merge this without any trouble. Then the API will be nailed down and you can do the further changes to the internals without any additional compatibility breaks during our upcoming beta period.

bfraboni commented 6 days ago

I've added the backwards compatible methods for ImageCache get_imagespec() and imagespec(), and TextureSystem get_imagespec(). I think the CI is happy now, I just need to write unit tests for the newer get_cache_dimensions() method and it'll be good to go. Thank you @lgritz for the directions !

bfraboni commented 4 days ago

I've just rebased the PR and added the unit tests for get_cache_dimensions()