|
From: | Peter Hillman |
Subject: | Re: [Openexr-devel] Deep data API: another batch of questions. |
Date: | Mon, 21 Apr 2014 10:19:37 +1200 |
User-agent: | Mozilla/5.0 (X11; Linux x86_64; rv:24.0) Gecko/20100101 Thunderbird/24.4.0 |
You will need to call setFrameBuffer before every call to
writePixels, as you need to update the frame pointers. The pointer you pass to Slice/DeepSlice is the memory location of pixel (0,0) in the image. This point will move in memory as you update your memory block with different scanlines. Your first call is probably doing the right thing. For each subsequent call you need to set up a new FrameBuffer with yStride*currentScanLine() subtracted from the base pointer, where currentScanLine() is the y offset of the first scanline you are writing. The library will only access the memory locations it needs to for writePixels() - there's no problem in passing an "illegal address" as a base pointer to setFrameBuffer, as long as (base+yStride*currentScanLine() + dataWindow.min.x*xStride) is always a valid location when writePixels() is called. The above is true for xSampling=1 and ySampling=1 - you may need to adjust the logic accordingly otherwise. On 19/04/14 21:18, Lerenard Michel
wrote:
|
[Prev in Thread] | Current Thread | [Next in Thread] |