"Douglas Handy" <[EMAIL PROTECTED]> wrote in message
news:[EMAIL PROTECTED]
> "Set up an uncompressed offscreen bitmap, then use WinCopyRectangle to
> decompress the first bitmap into the second."

In the end, this is probably the way you will have to go.

> The reason I don't want to do that is because what I'm trying to do is
access
> the color indexes of various pixels in a bitmap resource, even when
running on a
> non-color device.  So I compute the location of the bit(s) in the bit data
> portion and read them directly.
>
> It all works fine when the bitmap is not compressed.  When it is
compressed, I
> figured it easier to try to use BmpCompress() to uncompress it rather than
> decode the compression myself.

This stands to reason.

> I was anticipating that BmpCompress() would run on non-color devices (of
at
> least OS 3.5) even though I wouldn't expect to be able to make windows
with
> higher bit depth than the device supports.  How can I use
WinCopyRectangle() if
> I can't get a color depth capable window on non-color devices?
> Or can you? Will WinCreateBitmapWindow() allow that?

The color depth support is independent of the device capability, so as long
as the OS supports greater color depths, you can always create offscreen
windows/bitmaps of any color depth you like, provided there is enough
memory.

> It just seemed like uncompressing the bitmap and then reading the pixels I
want
> was the most efficient manner of achieving the desired end, but I can't
get
> BmpCompress() to accept the arguments even though I seem to meet the
criteria
> specified in the API docs.

Is there any possibility that the uncompressed bitmap size exceeds available
memory? It's unlikely that is the problem, but I just wanted to make sure.

Are you performing your testing on an OS5 device? If so you might want to
read about PACE shadow structures. For more information on shadow structures
go to
http://kb.palmsource.com/cgi-bin/palmsource.cfg/php/enduser/std_alp.php and
do a search on 'bitmap', then select the 'OS 5 High Density Overview' white
paper, then scroll down to the question titled 'How do I create a bitmap at
runtime whose bits I can access directly?' and read.

Hope this helps!

-Robert



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

Reply via email to