openexr-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Openexr-devel] Header Size?


From: Yanko Sanchez
Subject: [Openexr-devel] Header Size?
Date: Sat, 6 Mar 2010 13:20:56 -0800

I'm trying to read exr's using python's struct module. This is my first time reading binary files and the PDF at the openexr has been very helpful but I am a little puzzled on how to figure out what is the header size with its 'optional' attributes... For example, nuke includes a nuke hashstring but photoshop doesn't... before getting to the hashstring I don't think I can tell if the file came form nuke or photoshop... and if someone used their own plugin to create the EXR then the header might also contain other data that might throw of my reader. Is there a way to know where the header ends so I can skip all those bytes and just go straight to the offset of scanlines and pixel data? According to the docs there is a null byte at the end of the header, but there are lots of null bytes at the end of a lot of attributes. Is there a common way to dealing with this?

Once I get through the header I am able to read a float uncompressed scanline EXR file and display the data using matplotlib successfully. Any help would be appreciated!

Yanko

reply via email to

[Prev in Thread] Current Thread [Next in Thread]