I think I'm missing the forest for the trees here; this should be so obvious...
I've obtained a pointer to a bitmap in a resource, and I want to uncompress it.
Since BmpCompress() uncompresses in place, it can't use the pointer locked down
from the resource. So I try variations on this theme, where pBmp is the
previoiusly locked down pointer in the storage heap:
BitmapType* pBmp2;
size = BmpSize( pBmp );
pBmp2 = MemPtrNew( size );
MemMove( (void*) pBmp2, (void*) pBmp, size );
err = BmpCompress( pBmp2, BitmapCompressionTypeNone );
Yet I always get sysErrParamErr, which suggests that either the compression type
is invalid, the bitmap is already uncompressed, or the bitmap is in the storage
heap.
I'm positive the bitmap is compressed, because RscEdit shows it is, and because
the above code is actually inside an if block comparing the compression type and
only doing the above code when it is compressed.
What am I missing?
DUHg
--
For information on using the Palm Developer Forums, or to unsubscribe, please see
http://www.palmos.com/dev/support/forums/