openexr-devel
[Top][All Lists]
Advanced

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

Re: [Openexr-devel] Read OpenEXR from memory data source ?


From: Gernot Ziegler
Subject: Re: [Openexr-devel] Read OpenEXR from memory data source ?
Date: Mon, 7 Mar 2005 10:23:16 +0100 (MET)

Hej Paul !

Thanks for your suggestions, but the problem lies in the fact that the
dummy filename is invalid. It is being checked for in IStream, if I got it
right, and IStream casts an exception, which makes it impossible for me to
use as a memsource.

As a workaround, I now write the file down to /tmp/dummy.exr and read it
from there again ... not very efficient, but it works at the moment ;)

> it sounds like the buffer you're passing doesn't contain valid EXR data
> - that error means that it tried to read the "magic number" from the
> beginning of the stream, and it wasn't the correct magic number.  See
> ImfHeader.cpp line 804 for where this error occurs.
>
> Where are you getting the stream from?  The bytes in your memory buffer
> should be identical to the bytes of an EXR file on disk.  Also, I think
> that the EXR library expects the input stream to be little-endian - you
> don't happen to be running this on a big-endian machine, do you?
The file is fine as I could read it with my own programs, with the
workaround, and it was generated by the OpenEXR plugin of 3DSMax.
And no, no big/little-endian issues, only x86-I/O (brrr, had that problem
in my self-hacked RPF reader, never big-endian again ;) )

Servus,
  Gernot

-- 
T----------------------------W-E-L-C-O-M-E------------------------------T
O  The Austria <=> Sweden <=> Germany <=> Netherlands connection.....   H
|  http://www.mpi-sb.mpg.de/~gziegler | http://lysator.liu.se/~gz       E
\-----------------------------F-U-T-U-R-E-------------------------------/




reply via email to

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