Sorry for the delay... SIGGRAPH.

OpenEXR has the rather annoying habit of not preserving any canonical 
numerically indexed ordering to its channels. I don't know if it reflects how 
they are stored in the file or not, but through the IlmImf APIs for reading 
files, they are always presented in alphabetical order.

So to OpenEXR, there is not a meaningful, stable notion of "channel 0".  But 
OIIO wants that, so upon read (in the openexr.imageio reader) it actually 
resorts the channel names in a way to cluster the r, g, b channels together.

It looks like it's not working properly in your case.  Can you send me 
(privately is ok) a test file that exhibits this problem, and I bet I can 
quickly fix it so that the RGB are properly clustered?

Also, I hope that with OpenEXR 2.x, we can get to the point where the common 
convention is to use "multi-part" files, with a part for rgba, another part for 
"color", another part for "blinn", etc., rather than making just a single part 
with a whole pile of channels that the app is responsible for understanding and 
clustering into sub-groups or layers.

        -- lg


On Jul 17, 2013, at 9:06 AM, Michel Lerenard wrote:

> Hi,
> 
> i'm having a weird bug and i'm wondering if there's a workaround / another of 
> doing thing to could help me.
> 
> I'm trying to read the channel names from a file, and there's all messed up.
> 
> I've written the following channels, in that order to the file (a 16bits exr):
> r
> g
> b
> a
> color.r
> color.g
> color.b
> blinn.r
> blinn.g
> blinn.b
> depth.z
> 
> In the file the channels are not in the same order, i have
> r
> g
> depth.z
> color.r
> color.g
> color.b
> blinn.r
> blinn.g
> blinn.b
> b
> a
> 
> (in reverse order in the file, i assume that's how exr writes it)
> 
> 
> When reading the file, the order is once again messed up:
> blinn.r
> blinn.g
> b
> a
> depth.z
> blinn.b
> color.b
> color.g
> color.r
> g
> r
> 
> 
> I'm writing and reading data using the ImageSpec class. I found no index 
> array in it, how can I rebuilt an ordered list ?
> 
> Thanks in advance.
> 
> Michel
> _______________________________________________
> Oiio-dev mailing list
> [email protected]
> http://lists.openimageio.org/listinfo.cgi/oiio-dev-openimageio.org

--
Larry Gritz
[email protected]


_______________________________________________
Oiio-dev mailing list
[email protected]
http://lists.openimageio.org/listinfo.cgi/oiio-dev-openimageio.org

Reply via email to