Robert,

>2. Use BmpCreate ... WinCreateBitmapWindow() ... and draw the 
>'Tbmp' resource into it.

Ever notice how so many programmers have flat foreheads? :)

It works fine now, albeit much slower than with uncompressed bitmaps where I can
still safely access the Tbmp resource bits even under OS5 because I'm accessing
the resource data itself, not after it has been drawn into a window or loaded
into a bitmap structure.  Thus it must be in Tbmp endian and alignment format.

>> I am still curious though why BmpCompress() is giving me a parameter error

>So am I, but I've found that bitmap handling in PalmOS is kind of a
>tempermental beast not easily placated.

OK

>On a side note, if you plan to access the bitmap pixels directly without
>using the WinGetPixel() API call, you will need to do things a little
>differently. 

Not when I'm grabbing them directly out of the Tbmp resource, as far as I can
tell.  When compressed, it now goes through the sequence you gave and uses
WinGetPixel(), but if not compressed just calculates the offsets and grabs the
associated bits for the specified depth.

Seems to run just fine on both OS5 and OS4 devices I've tried it on, in both
uncompressed and (now) compressed formats.

>This will not work in OS5 due to the fact that a bitmap
>created with BmpCreate lives behind the PACE layer, 

However, since I'm not using BmpCreate (just the Tbmp resource itself) it still
works fine for uncompressed bitmaps even under OS5 -- assuming of course it is a
Tbmp resource not an abmp resource.

Thanks for your help -- even if I still don't know why BmpCompress() didn't work
for me.  

Doug

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

Reply via email to