My question stems off the fact that we have both custom fonts and jpeg
images in our product.
The fonts alone take up 150K of the heap (they are stored as data records,
and then casted for FntDefineFont - since that memory must stay locked until
use of the font is done, it takes up the memory), I was trying to consider a
way to store the fonts in such a fashion where I could keep them and not
lose so much space on the heap.

I'm also trying to think of a way to store the resulting bitmap (from the
jpeg library) - in such a way where I don't have to keep a handle to it in
memory (on the heap) so that scrolling down a page is not such a problem.
Here I'm considering dumping the bitmaps to a temp database as a bitmap
resource.  Then reading the bitmap resource and drawing it only as needed.
That would remove the requirement of keeping it in heap for such an extended
period of time as well.  (especially since there could be as many as 10 or
so images on a single page that need to scroll smoothly.)  All of which is
160x160 and 16bit.

Unfortunately my efforts to store the bitmap as a bitmap resource in the
tempDb is failing.  I end up with a corrupted image (hence a previous email
last night).  So I really need to see if I can address one or both of these
issues.

Any help would be appreciated..

thanks - bill


"Ben Combee" <[EMAIL PROTECTED]> wrote in message
news:[EMAIL PROTECTED]
> At 01:22 PM 1/29/2004, Fruber Malcome wrote:
> >Do both resources (e.g. Tbmp or nfnt etc) use the same amount of heap as
a
> >data record? (assuming they are both the same size?)  Does it matter what
> >type of resource that it is?
>
> A resource takes up a very slightly larger amount of heap than a record
(on
> the order of eight bytes).  This is due to the larger resource header that
> has to hold the resource type and ID.  Type is not a factor, unless you
> have an application or operating system that's trying to interpret the
> resource.
>
> -- 
> Ben Combee <[EMAIL PROTECTED]>
> CodeWarrior for Palm OS technical lead
> Palm OS programming help @ www.palmoswerks.com
>
>



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

Reply via email to