Image: Add OIIO support APIs

This adds a new set of APIs supporting the loading and saving of image
formats through OIIO. It makes use of the recent IOProxy work in OIIO
to align with the existing Blender image loading/saving machinery.

The support code here has been prototyped to work with ~7 of our image
formats so far. It includes centralized handling of `IB_test`,
`IB_mem`, and `IB_metadata` flags, which the existing code did not
handle consistently or at all depending on the format.

The PSD format (`format_psd.cc`) is included since the prior location
of the code has been restructured away. It serves as an example of how
the loading code typically flows for all the other formats.

Pull Request: blender/blender#105519
This commit is contained in:
2023-03-14 04:42:17 +01:00
committed by Jesse Yurkovich
parent 19565469c8
commit 8929ed75d4
15 changed files with 558 additions and 333 deletions

View File

@@ -480,7 +480,7 @@ static PyObject *M_imbuf_load(PyObject *UNUSED(self), PyObject *args, PyObject *
return NULL;
}
ImBuf *ibuf = IMB_loadifffile(file, filepath, IB_rect, NULL, filepath);
ImBuf *ibuf = IMB_loadifffile(file, IB_rect, NULL, filepath);
close(file);