Hi,

   use BmpGetBits to obtain the bitmap data pointer.

-----Original Message-----
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED]
Sent: Wednesday, 26 January, 2005 15:08
To: Palm Developer Forum
Subject: bmpCreate problem on PalmOs 5


Hello,

I used bmpcreate to print a bitmap on screen.

  BitmapPtr bufferB;
  unsigned char tmp[1000];

                                                                                
                                                               for(i=0; i < 
9600; i++)
  {
    tmp[i] = i%255;
  }
  bufferB = BmpCreate(160, 120, 4, NULL, &error);

                                                                                
                                                               if(bufferB)
  {
    d = (unsigned char*) bufferB;
                                                                                
                                                                 for (i = 0; i 
< 9600; i++)
       *(d + 16 +i) = 255 - tmp[i];   // PB here
                                                                                
                                                                 WinDrawBitmap 
(bufferB, 0, 16);
    BmpDelete(bufferB);
  }

This sample works well on PalmOS 4 and under but not in PalmOS 5.
The problem is when I copy tmp in bitmap.
If someone can help me?

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

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

Reply via email to