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
Currently, constructing a File with header_only=true simply skips the reading of channel data, so a subsequent write doesn't do the right thing. Ideally, the write would do a block copy of the channel data from the old file to the new.
The text was updated successfully, but these errors were encountered:
Hi Cary, I could take a look at this if you don't mind. Technically it wouldn't be my first contribution to OpenEXR but it would probably a bit more meaningful than fixing a typo :)
Check out what exrstdattr does, in src/bin/stdattr/main.cpp. It calls copyPixels() on the output part. You'll want to do something similar, but it will mean keeping track of the input part in a way the existing code does not.
Hi again. I made myself familiar with the code, and I made some progress on this.
However, I have a question about PyFile::parts, the current code indicates to me that one is not supposed to alter the references in PyFile::parts. Is this correct? Perhaps I've just missed some part of the documentation.
If I get a OpenEXR.File from somewhere, I can replace or add parts, as it is a standard Python list. For example, file.parts[0] = OpenEXR.Part(...) or file.parts.append(OpenEXR.Part()). But part indices of a PyFile are set through a private mechanism, at least from the Python users view.
The reason I ask is because if one replaces a part in PyFile::parts as above, we would sort of lose track of the source part. I guess one could check the references and detect that this has happened, but if modifying PyFile::parts this way is unsupported, then I could go for a much simpler mechanism.
Currently, constructing a
File
withheader_only=true
simply skips the reading of channel data, so a subsequent write doesn't do the right thing. Ideally, the write would do a block copy of the channel data from the old file to the new.The text was updated successfully, but these errors were encountered: