Interesting. I followed your suggestion, started Load () with this:
void Load (...
{
MemHandle recH, bmH;
BitmapType *storedBmP, *bmP;
WinHandle oldWin;
Char *bitsP;
UInt16 size;
Coord width, height;
UInt16 rowBytes;
recH = DmQueryRecord (DbGetDrawingDataRef (), index);
if (recH)
{
storedBmP = (BitmapType *) MemHandleLock (recH);
BmpGetDimensions (storedBmP, &width, &height, &rowBytes);
bitsP = (Char *) BmpGetBits (storedBmP);
size = BmpSize (storedBmP);
etc.
}
Dimensions of bitmap to save were 160 & 160. Now,
BmpGetDimensions gives dimensions of -258 and -258,
and rowBytes of 65278!
Also, "size = BmpSize (storedBmP)" provokes a Sim crash.
Am I dreaming?
Thanks
Alex
"SLO Revo News" <[EMAIL PROTECTED]> wrote in message
news:[EMAIL PROTECTED]
>
> Your saving into the record code looks OK. For reading from the
> record, this works for me (there may be an easier way):
>
> - Get the record pointer
> - Get the bitmap dimensions and color table pointer from the record
pointer
> - Create a new bitmap using the dimensions and color table pointer
> - Move the bitmap data from the record into the new bitmap
> - Uncompress the bitmap
>
> Regards,
> Steve Mann
>
--
For information on using the Palm Developer Forums, or to unsubscribe, please see
http://www.palmos.com/dev/support/forums/