Apply 8bit pixmap to a 16bit buffer

D

Daniele M.

Hi!

I hope someone could help me :)

I'm playing with cool FreeType library;

I have an 8bit pixmap (i suppose it should holds the values i have
combine with OR with my screen backbuffer in order to calculate
correctly the pixel color).

My problem is: my display backbuffer is 16bit (565), so when i apply
my pixmap with something like this:

pixel[x][y]=pixel[x][y] | pixmap[a,b]

it doesn't work very well (actually the pixel isn't changed as it
should :D)

I think the main problem is: pixel is a 16bit value, pixmap instead is
an 8bit value...
I think i should do a sort of conversion for pixmap...but i can't
figure how...

Please helppp!

Thanks in advance for your time.

Regards.
 
S

Sam

Daniele said:
I think the main problem is: pixel is a 16bit value, pixmap instead is
an 8bit value...
I think i should do a sort of conversion for pixmap...but i can't
figure how...

Please helppp!

This has nothing to do with C++, the language, but rather some specific
library. You should try looking for a newsgroup or a mailing list that
discusses that specific graphics library, rather than a newsgroup for
language-related question.


-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.7 (GNU/Linux)

iD4DBQBHzztMx9p3GYHlUOIRApXiAJjR2g3FV0y6HZEyzUbRTGLuVR1oAJ4ijZQI
TzttYnWAxlMdop4Jod4p4A==
=g1gN
-----END PGP SIGNATURE-----
 
D

Daniele M.

This has nothing to do with C++, the language, but rather some specific
library. You should try looking for a newsgroup or a mailing list that
discusses that specific graphics library, rather than a newsgroup for
language-related question.

application_pgp-signature_part
1KScarica

Mmmmh...i supposed a 8bit to 16bit conversion could be related to c++,
graphic library or not ;)
Btw..i will search for it!
Thanks.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,768
Messages
2,569,574
Members
45,048
Latest member
verona

Latest Threads

Top