[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Openexr-devel] Crash when reading sample images
From: |
Brendan Bolles |
Subject: |
Re: [Openexr-devel] Crash when reading sample images |
Date: |
Tue, 9 Nov 2010 11:34:25 -0800 |
On Oct 22, 2010, at 4:21 AM, Ronny Spiegel wrote:
> char *tmpBuf = new char[width * height *
> getPixelSize(channel.channel().type) * 2];
> buffers.push_back(tmpBuf);
>
> // calculate the address of pixel (0,0)
> char *base = tmpBuf + (getPixelSize(channel.channel().type) *
> (sz.min.x - sz.min.y * width));
I think your bug might be this (in patch form):
- char *base = tmpBuf + (getPixelSize(channel.channel().type) * (sz.min.x -
sz.min.y * width));
+ char *base = tmpBuf + (getPixelSize(channel.channel().type) * (-sz.min.x -
(sz.min.y * width));
Also, not sure why you have * 2 at the end of your memory allocation up there.
Brendan
- Re: [Openexr-devel] Crash when reading sample images,
Brendan Bolles <=