jamesbowman / openexrpython

OpenEXR bindings for Python
Other
94 stars 35 forks source link

Loading EXR by tiles? #33

Closed ShnitzelKiller closed 4 years ago

ShnitzelKiller commented 4 years ago

Is it currently possible to use this interface library to do something like the following?

file.readTiles (startXTiles, endXTiles, startYTiles, endYTiles)

One of the benefits of OpenEXR is allowing random access of images without decompressing the entire file. However, as far as I can tell this library doesn't support that type of loading?

ShnitzelKiller commented 4 years ago

I've implemented it myself, with a pending pull request. The proposed change is to have a TiledInputFile object which has similar methods to the InputFile, however its channel and channels methods take min and max X and Y tile indices, allowing to load a crop of a tiled image. The class also has methods numXTiles() and numYTiles() from the C++ library.

jamesbowman commented 4 years ago

Wow. Thanks very much.