Use dynamic memory allocation instead of stack allocation to avoid PPC compiler error.

git-svn-id: file:///srv/svn/repos/haiku/trunk/current@10109 a95241bf-73f2-0310-859d-f6bbb57e9c96
This commit is contained in:
Michael Pfeiffer 2004-11-21 10:28:42 +00:00
parent 0e2d20ebd5
commit 2c0a864ba3

View File

@ -70,7 +70,7 @@ void HalftonePreviewView::preview(float gamma, float min, Halftone::DitherType d
halftone.setBlackValue(Halftone::kLowValueMeansBlack);
const int widthBytes = (width + 7) / 8; // byte boundary
uchar buffer[widthBytes];
uchar* buffer = new uchar[widthBytes];
const uchar* src = (uchar*)testImage.Bits();
uchar* dstRow = (uchar*)preview.Bits();
@ -116,6 +116,8 @@ void HalftonePreviewView::preview(float gamma, float min, Halftone::DitherType d
src += testImage.BytesPerRow();
dstRow += preview.BytesPerRow();
}
delete buffer;
SetViewBitmap(&preview);
Invalidate();