Dear Ben:

    I am working on a Image editing program. That is why I have to access
the bits data directly.

    "bitmap[(long)i]" does not work. It just crashed.

My code is like this:

UInt32 i, len;

len=640;
len*=480;

pBitmap=BmpCreate(640,480,16,NULL, &err);
bufPart=(UInt16*)BmpGetBits(pBitmap);
for (i=0;i<len;i++)
{
    bufPart[i]=0x07e0;
}

It will crash while i>65535.

"Ben Combee" <[EMAIL PROTECTED]> wrote in message
news:[EMAIL PROTECTED]
> At 01:30 PM 3/4/2004, you wrote:
> >In Palm OS 4.0, we can create a bitmap larger than 64K. But how can we
> >access the bits data directly?
> >
> >I tried BmpGetBits, but the access beyond its 64k failed.
>
> What tools are you using?  How are you trying to do the access?  If you
are
> treating the bitmap as an array of chars, make sure that the index
> expression is typed as a long, i.e.
>
> val = bitmap[(long)i];
>
> since treating i as an unsigned int would cause the problems you see.
>
>
> -- Ben Combee, senior DTS engineer, PalmSource, Inc.
>     Read "Combee on Palm OS" at http://palmos.combee.net/
>
>
>



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

Reply via email to