-
Notifications
You must be signed in to change notification settings - Fork 630
New issue
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
ImfCompressor.h is not installed #581
Comments
What's the case for requiring ImfMisc.h? Since including ImfMisc.h from user code will fail, a better fix could be to prevent ImfMisc.h being installed. If there's some method in there that would be useful to user code, perhaps it could be transplanted out of ImfMisc.h and made an official part of the OpenEXR API |
It looks like Nuke is the only application having problem reading the file. I have a library that does auto-cropping. I do these steps:
This is working great, except for a corner case where i have a tiled input with a single part. To solve this I set the chunkSize myself after changing the dataWindow. by calling: Header h(in.header(part));
h.insert("dataWindow", Box2iAttribute(cropped_dw));
h.setChunkCount(getChunkOffsetTableSize(h, true));
I'm not sure if the real problem is that there are cases where If i don't set the chunk size manually. The file wont open in nuke with the error: wrong offset count, not able to read from this array, it opens fine in RV, DJV, Krita. |
Good find! Have you tried erasing the chunkCount attribute, rather than going to the trouble of setting it correctly? |
Thank you! Header h(in.header(part));
h.insert("dataWindow", Box2iAttribute(dw));
if(h.hasChunkCount())
h.erase("chunkCount"); Removing the chunkCount attribute makes all my tests pass. My issue is resolved by not depending on ImfMisc, but i guess the real solution is to remove IlmImf.h from installed headers rather than adding ImfCompressor.h. |
ImfMisc.h is included in exrmaketiled and by several files in IlmImfTest (which are essentially like external application code calling into the library), each to access getChunkOffsetTableSize(). Can/should that function move to another .h? If so, we can switch IlmMisc.h to not be exported. |
I think the change that @smaragden made would also be appropriate for exrmaketiled, though that would change the output files it generates when the output only has one part. Making that change would mean we can stop exporting ImfMisc.h, but carry on allowing IlmImfTest to use it. The IlmImfTest examples are using getChunkOffsetTableSize() to do low-level manipulations of files to simulate damaged files, so it's harder to see how to eliminate the code completely. I'm not sure whether there are legitimate reasons to call getChunkOffsetTableSize() from user code. The OpenEXR API doesn't really provide low-level access to the file structure. |
#605 addresses this, by un-installing ImfMisc.h. The functions defined there are for internal use only, for low-level manipulation of the file structure, not appropriate for application code. |
ImfCompressor.h is included in ImfMisc.h but not installed.
It seems to be the case for all 2.* releases.
The text was updated successfully, but these errors were encountered: