[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Openexr-devel] OpenEXR single scanline read
From: |
Florian Kainz |
Subject: |
Re: [Openexr-devel] OpenEXR single scanline read |
Date: |
Thu, 17 Apr 2003 10:07:27 -0700 |
Charles Henrich wrote:
>
> Im having a devil of a time reading a float exr that has a databox and display
> box aligned at -98,-98,2147,1652.
>
> It dumps core in readPixels no matter what I try and do.
>
> Something like this should work for reading a single scanline (exrY) out of
> the file yeah?
>
> float pixels[datawin.max.x-datawin.min.x+1];
>
> fbuf.insert(channelname,
> Imf::Slice(Imf::FLOAT, (char *)pixels-datawin.min.x,
> sizeof(float), 0));
>
> inputfile->setFrameBuffer(fbuf);
> inputfile->readPixels(exrY);
>
> The only thing I can figure is somehow the calculation is wrong for the buffer
> space? Are there any other tools available that will read float images?
Try this:
Imf::Slice(Imf::FLOAT, (char *)(pixels-datawin.min.x),
or this:
Imf::Slice(Imf::FLOAT, (char *)pixels-datawin.min.x*sizeof(float),