> > can you be a bit more specific? what screen depth are you in?
> > 256 color? looking at the logic, it should give you:
> >
> > 000000
> > 111111
> > 222222
> > 333333
> > ......
> > hhhhhh
>
> I'm sorry..
> Actually I am in 256 colors. Logically, my buffer is exactly what you've
said.
> But on the screen I sometimes got
> 000001
> 111122
> 222333
> 33
> That is exactly as if the width of my picture sometimes goes to dw+1 and
> sometimes to dw.
is there any chance that dw is odd when this happens? palm pads each
row on word bounaries if memory serves me correct :) so, if you have
an odd width, you need to do skip an extra byte on each row.
> > bp2=BmpCreate(dw,dh,deep,NULL,&err); //dw and dh <160
> >
> > loc =BmpGetBits(bp2);
> >
> > for (i = 0; i < dh; i++)
> > {
> > for (j=0;j<dw;j++)
> > {
> > *loc++ = i;
> > }
if (dw & 1) loc++;
> > }
> >
> > WinDrawBitmap(bp2, 0, 0);
insert that line, and, it should work as planned *g*
---
Aaron Ardiri [EMAIL PROTECTED]
CEO - CTO +46 70 656 1143
Mobile Wizardry http://www.mobilewizardry.com/
--
For information on using the Palm Developer Forums, or to unsubscribe, please see
http://www.palmos.com/dev/support/forums/