Keyur Patwa wrote:
UInt8 *grayedImage = (UInt8*) MemPtrNew((320*240)* sizeof(UInt8));

Currently I am doing this and it doesn't generate any error or exception
but it doesn't give me proper data so I assume that 64K memory
limitation is playing role here. Please correct me if I am wrong!

Can anyone suggest what should I do to solve this problem?

320*240*1=75k, which is indeed more than 64k. Thus, you cannot store that in a contiguous block; you need to split it into two or more pieces of less than 64k each. One natural way to do this would be to have a heap block for each row, and a heap block for the rows list; that way, you could access it as though it were a two-dimensional array.


-- For information on using the Palm Developer Forums, or to unsubscribe, please see http://www.palmos.com/dev/support/forums/

Reply via email to