We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
I'm trying to write some large images using Python. I have this code, based on the example in the docs.
import OpenEXR, Imath import numpy as np width = 32768 height = width dtype = np.float32 h = OpenEXR.Header(width,height) h['channels'] = {'R' : Imath.Channel(Imath.PixelType(Imath.PixelType.FLOAT))} o = OpenEXR.OutputFile("hello.exr", h) r = np.zeros(shape=(height,width), dtype=dtype) r[height//2-100:height//2+100,width//2-100:width//2+100] = 3.4 channels = {'R' : r.tobytes()} o.writePixels(channels) o.close()
It gives me
TypeError Traceback (most recent call last) Cell In[6], line 16 13 r[height//2-100:height//2+100,width//2-100:width//2+100] = 3.4 14 channels = {'R' : r.tobytes()} ---> 16 o.writePixels(channels) 18 o.close() TypeError: Data for channel 'R' should have size 0 but got 4294967296
For smaller width, it works fine. I guess it's some kind of limit on the size dtype used internally somewhere. Is there a workaround?
width
The text was updated successfully, but these errors were encountered:
No branches or pull requests
I'm trying to write some large images using Python. I have this code, based on the example in the docs.
It gives me
For smaller
width
, it works fine. I guess it's some kind of limit on the size dtype used internally somewhere. Is there a workaround?The text was updated successfully, but these errors were encountered: