|
From: | Peter Hillman |
Subject: | Re: [Openexr-devel] how to properly save with data window? |
Date: | Tue, 14 Feb 2012 14:20:32 +1300 |
User-agent: | Mozilla/5.0 (X11; Linux x86_64; rv:9.0) Gecko/20111222 Thunderbird/9.0.1 |
On 14/02/12 11:44, Paul Miller wrote:
On 2/13/2012 4:33 PM, Ciaran Wills wrote:I think you probably need to offset the pixel pointer to point at where pixel (0, 0) would be - section 2.2 explains the pixel pointer math a bit clearer.I tried that as well: const half *pixels = pixPtr + chan_index; pixels = pixels - dataWindow.min.x - (dataWindow.min.y * width);fb.insert(chanName, Slice(HALF, (char *)(pixels), sizeof(half) * channels, sizeof(half) * width * channels));
Shouldn't that be:pixels = pixels - ( dataWindow.min.x - (dataWindow.min.y * width) ) * channels;
?
[Prev in Thread] | Current Thread | [Next in Thread] |