You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I encountered an issue when trying to use OpenEXR.OutputFile to write to a BytesIO buffer. The operation fails with the following error: OSError: Cannot open image file "". file write failed. It appears that OpenEXR.OutputFile does not handle in-memory buffers as expected.
Traceback (most recent call last):
File "script.py", line 30, in <module>
exr_bytes = encode_exr(random_image)
^^^^^^^^^^^^^^^^^^^^^^^^
File "script.py", line 22, in encode_exr
exr = OpenEXR.OutputFile(buffer, header)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
OSError: Cannot open image file "". file write failed
Expected Behavior:
OpenEXR.OutputFile should support writing to a BytesIO buffer without raising an error.
I am not very C++ savvy but it seems that the C++ implementation and the python wrapper would handle a byte stream for image writing? Especially when reading from a byte stream is supported.
Appreciate any help. Thanks!
Environment:
Python version: 3.11.9
OpenEXR version: 3.2.4
OS: Linux Mint 21.2
The text was updated successfully, but these errors were encountered:
Description:
I encountered an issue when trying to use
OpenEXR.OutputFile
to write to aBytesIO
buffer. The operation fails with the following error:OSError: Cannot open image file "". file write failed
. It appears thatOpenEXR.OutputFile
does not handle in-memory buffers as expected.Steps to Reproduce:
Expected Behavior:
OpenEXR.OutputFile
should support writing to aBytesIO
buffer without raising an error.I am not very C++ savvy but it seems that the C++ implementation and the python wrapper would handle a byte stream for image writing? Especially when reading from a byte stream is supported.
Appreciate any help. Thanks!
Environment:
The text was updated successfully, but these errors were encountered: