Skip to content

Commit 771bc2d

Browse files
authored
fix(python): python ImageBuf.init_spec did not return correct value (AcademySoftwareFoundation#4805)
Signed-off-by: Larry Gritz <lg@larrygritz.com>
1 parent ed3adba commit 771bc2d

2 files changed

Lines changed: 2 additions & 2 deletions

File tree

src/python/py_imagebuf.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -340,7 +340,7 @@ declare_imagebuf(py::module& m)
340340
[](ImageBuf& self, std::string filename, int subimage,
341341
int miplevel) {
342342
py::gil_scoped_release gil;
343-
self.init_spec(filename, subimage, miplevel);
343+
return self.init_spec(filename, subimage, miplevel);
344344
},
345345
"filename"_a, "subimage"_a = 0, "miplevel"_a = 0)
346346
.def(

src/python/stubs/OpenImageIO/__init__.pyi

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -320,7 +320,7 @@ class ImageBuf:
320320
def getchannel(self, x: int, y: int, z: int, c: int, wrap=...) -> float: ...
321321
def geterror(self, clear: bool = ...) -> str: ...
322322
def getpixel(self, x: int, y: int, z: int = ..., wrap: str = ...) -> tuple[float, ...]: ...
323-
def init_spec(self, filename: str, subimage: int = ..., miplevel: int = ...) -> None: ...
323+
def init_spec(self, filename: str, subimage: int = ..., miplevel: int = ...) -> bool: ...
324324
def interppixel(self, x: float, y: float, wrap: str = ...) -> tuple[float, ...]: ...
325325
def interppixel_NDC(self, x: float, y: float, wrap: str = ...) -> tuple[float, ...]: ...
326326
def interppixel_NDC_full(self, x: float, y: float, wrap: str = ...) -> tuple[float, ...]: ...

0 commit comments

Comments
 (0)