Apply 8bit pixmap to a 16bit buffer

Discussion in 'C++' started by Daniele M., Mar 6, 2008.

  1. Daniele M.

    Daniele M. Guest

    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.
    Daniele M., Mar 6, 2008
    #1
    1. Advertising

  2. Daniele M.

    Sam Guest

    Daniele M. writes:

    > 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-----
    Sam, Mar 6, 2008
    #2
    1. Advertising

  3. Daniele M.

    Daniele M. Guest

    On 6 Mar, 01:31, Sam <> wrote:
    > Daniele M. writes:
    > > 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.
    >
    > 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.
    Daniele M., Mar 6, 2008
    #3
    1. Advertising

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

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Christopher Stone

    QPushButton with pixmap problem

    Christopher Stone, Jun 27, 2004, in forum: Python
    Replies:
    1
    Views:
    411
    Phil Thompson
    Jun 27, 2004
  2. Thomas Girod

    create pixmap from data

    Thomas Girod, Apr 14, 2006, in forum: Python
    Replies:
    1
    Views:
    463
    Eric Deveaud
    Apr 14, 2006
  3. humble
    Replies:
    0
    Views:
    879
    humble
    Oct 28, 2006
  4. cerr

    16bit values into 8bit eeprom

    cerr, Feb 17, 2011, in forum: C Programming
    Replies:
    1
    Views:
    363
    Ike Naar
    Feb 17, 2011
  5. cerr

    store 16bit values in 8bit eeprom

    cerr, Feb 17, 2011, in forum: C Programming
    Replies:
    2
    Views:
    1,000
    BartC
    Feb 18, 2011
Loading...

Share This Page