I am trying to implement Imf::Ostream. Unfortunately, the EXR manual only shows how to implement Imf::Istream. That being said, please consider this pseudocode:
In both cases, files of almost equal sizes are successfully written.
All EXR viewers can open a file generated by #1. All EXR viewers crash when opening a file generated by #2.
Please note that I am constructing MyOStream with an std::ofstream, instead of std::ostream. Does anyone have an example of a working implementation of Imf::Ostream?