Results 1 to 3 of 3

Thread: QBitmap color inversion

Threaded View

Previous Post Previous Post   Next Post Next Post
  1. #2
    Join Date
    Jan 2006
    Location
    Warsaw, Poland
    Posts
    33,368
    Thanks
    3
    Thanked 5,018 Times in 4,794 Posts
    Qt products
    Qt3 Qt4 Qt5 Qt/Embedded
    Platforms
    Unix/X11 Windows Android Maemo/MeeGo
    Wiki edits
    10

    Default Re: QBitmap color inversion

    In general we (humans) consider white to be the natural colour of paper and black to be the "ink" (opaque colour). QBitmap stores bits. Value 0 represents "empty" and value 1 represents "opaque". Black corresponds to 0 (#000000), white corresponds to 1 (#FFFFFF) so if the engine receives an "inverted" picture, it inverts it back so that you can see your "white is paper" despite the bit values really used by QBitmap. In other words the conversion tells the bitmap that although it sees black, it should show white and the other way round.
    Your biological and technological distinctiveness will be added to our own. Resistance is futile.

    Please ask Qt related questions on the forum and not using private messages or visitor messages.


  2. The following user says thank you to wysota for this useful post:

    jkv (20th July 2009)

Similar Threads

  1. QBitmap does not scale correctly with QPainter
    By macaco in forum Qt Programming
    Replies: 0
    Last Post: 8th August 2008, 11:40
  2. reading writing qimage / qbitmap to and from memory
    By JeanC in forum Qt Programming
    Replies: 2
    Last Post: 13th May 2008, 11:28
  3. how can QPixmap transformation to QBitmap faster
    By duduqq in forum Qt Programming
    Replies: 4
    Last Post: 4th May 2008, 04:44
  4. Does QDrag support QBitmap?
    By alfa_wu in forum Qt Programming
    Replies: 8
    Last Post: 9th May 2007, 02:56

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Qt is a trademark of The Qt Company.