----- Original Message ----- 
From: "Aaron Ardiri" <[EMAIL PROTECTED]>
To: "Palm Developer Forum" <[EMAIL PROTECTED]>
Sent: Saturday, January 31, 2004 9:50 AM
Subject: Re: bitmap in .rcp


> > My old app has a bitmap declared by a .r file, compiled by PalmRez,  as
> > follows:
> >
> > read 'Tbmp' (3500) "pic1.bin";
> >
> > When I rewrite this with .rcp file using PilRC  ( after renaming the
> > extension to .bmp because PilRc complaines about the extension )
> >
> > BITMAP ID 3500 "pic1.bmp" BPP1
> >
> > I get the following error : Bitmap not monochrome, 16, 256, 16bit, 24bit
or
> > 32bit color.
> >
> > How can I fix this problem ?
>
> well, i fyou did pic1.bin --> pic1.bmp, of course it'll barf. since
> you already have the 'resource' generated, you can use this:
>
>   DATA ID 3500 "pic1.bin"
>
> you only use the BITMAP tag if you have the bitmap as a real bitmap
> file (ie: a .bmp file), which pilrc can then parse and generate the real
> bitmap resource from.
>

Thanks, Aaron.

This pic1.bin is really a bitmap file. In the old project, it is read by
DmGetResource and casted to BitmapPtr by MemHandleLock.

I check the tool that generates this bitmap file and it uses BitmapTypeV2
format. The following is from the source of that tool :

typedef struct {
short int width;
short int height;
short int rowBytes;
short int flags;
char pixelSize;
char version;
//
short int nextDepthOffset;
char transparentIndex;
char compressionType;
short int reserved;
} PalmOSBitmap;

I only rename its extenstion from .bin to .bmp because with the .bin
extension,  PilRc complains :
Error : bitmap file extension not recognized for file ....pic1.bin

Vu


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

Reply via email to