Path: chuka.playstation.co.uk!news From: James Russell Newsgroups: scee.yaroze.programming.2d_graphics Subject: Re: argh Date: Thu, 26 Nov 1998 13:24:21 +0000 Organization: Sony Computer Entertainment Europe Lines: 25 Message-ID: <365D5685.328E0BF5@scee.sony.co.uk> References: <73i0rg$9ia6@chuka.playstation.co.uk> <73j1ld$9ia11@chuka.playstation.co.uk> <73jj6i$9ia13@chuka.playstation.co.uk> NNTP-Posting-Host: mailgate.scee.sony.co.uk Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit X-Mailer: Mozilla 4.5b2 [en] (Win95; I) X-Accept-Language: en Nigel Critten wrote: > > below is what I'm doing to allocate the memory > > u_long *image = (u_long *)malloc ((grabwidth*grabheight/2+5)*4); > > this causes a freeze. Have you called InitHeap? You must do this before using malloc. BTW the correct size for storing the result of a StoreImage is: Width * Height * 2; The times 2 is because each pixel in the VRAM is 16 bits, not 8. Cheers, James -- == James_Russell@scee.sony.co.uk +44 (171) 447-1626 == Developer Support Engineer - Sony Computer Entertainment Europe If at first you don't succeed, destroy all evidence that you tried.