Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

How translate psoSrc to psoDst by pxlo (translation object)?

2 views
Skip to first unread message

Sanghoon Kim

unread,
Jan 6, 2003, 12:59:13 AM1/6/03
to
I've hooked DrvCopyBits and
I've found that bitmap of source surface was copied
that of destination surface with translation object.
4 bpp bitmap of size of (64,32)-source was converted to
32 bpp bitmap of size of (16,16)-destination with Xlate vector of
{ 00 00 00 00 00 80 00 00 00 00 80 00 00 80 80 00
00 00 00 80 00 80 00 80 00 00 80 80 00 C0 C0 C0
00 80 80 80 00 FF 00 00 00 00 FF 00 00 FF FF 00
00 00 00 FF 00 FF 00 FF 00 00 FF FF 00 FF FF FF } (16 entries)

I think there is no loss in bitmap data since total bitmap size is same to
each other. But I cannot understand translation machanism clearly.

Who wanna uncover fog? :)

Tim Roberts

unread,
Jan 7, 2003, 12:09:10 AM1/7/03
to
sh...@kings.co.kr (Sanghoon Kim) wrote:

This is just a palette lookup table (and it's the standard 4-bit palette
lookup table at that). Each byte of the 4-bit bitmap contains two pixels:
one in each nybble. Each nybble is translated to a 32-bit pixel by looking
up the corresponding index into the translation table. If the first pixel
is "1B", the output will be 00 80 00 00, 00 F0 F0 00.

However, that particular operation is only using a portion of the source
bitmap: you're only getting 16x16 pixels. In that sense, you ARE losing
data.
--
- Tim Roberts, ti...@probo.com
Providenza & Boekelheide, Inc.

0 new messages