----- Original Message ----- 
From: "Matt Graham" <[EMAIL PROTECTED]>
Newsgroups: palm-dev-forum
To: "Palm Developer Forum" <[EMAIL PROTECTED]>
Sent: Monday, February 02, 2004 12:36 PM
Subject: Re: bitmap in .rcp


> Vu Pham wrote:
> > ----- Original Message ----- From: "Aaron Ardiri"
> > <[EMAIL PROTECTED]>
>
> [...]
>
> >>
> >> 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.
> >>
> >
> > 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 :
>
> I think what he's saying is that the format for a windows bitmap in a
> .bmp file and the format for a Palm bitmap in a resource are not the same.
>
> By calling it a Bitmap in the .RCP, it parses the windows format and
> outputs the Palm format.  Since you already have your bitmap in the Palm
> format, you need not parse it again and will get an error if you try.
> So you should just add it as previously suggested:
> DATA ID 3500 "pic1.bin"


Thanks, Matt. I did learn a lot from this problem. As you said, PilRC parses
the Windows bitmap, not the PalmOS bitmap. Second, PilRC uses DATA to import
binary file. My binary file is in PalmOS bitmap format therefore it caused
that problem.

Btw, the resrouce type needs to add to the decl, for example:

DATA "Tbmp" ID 3500 "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