cessen / openexr-rs

This repository has been moved to https://github.com/vfx-rs/openexr-rs
MIT License
23 stars 10 forks source link

Support tiled read #38

Closed norru closed 5 years ago

norru commented 5 years ago

I am reading EXR files containing depth data from a third party software which uses tiled formats, whose output is not customizable in any way.

In fact, what I am currently trying to do is to read the files generated by this software and, among other things, convert them to scanline images.

I cannot think of alternative options except using direct native calls (or even a different programming languages).

file format version: 2, flags 0x200
channels (type chlist):
    Z, 32-bit floating-point, sampling 1 1
compression (type compression): pxr24
dataWindow (type box2i): (0 0) - (1919 1279)
displayWindow (type box2i): (0 0) - (1919 1279)
exif (type blob)
lineOrder (type lineOrder): increasing y
pixelAspectRatio (type float): 1
screenWindowCenter (type v2f): (0 0)
screenWindowWidth (type float): 1
tiles (type tiledesc):
    single level
    tile size 128 by 128 pixels
type (type string): "tiledimage"

I am not concerned about generating tiled images, just reading from them.

I am not concerned about MIPs and RIPs.

norru commented 5 years ago

Never mind, it does appear that I diverted myself after a red herring and I can actually read tiled images just fine with the current API :smile: (as long as I read the entire framebuffer).