Results 1 to 2 of 2

Thread: Haw many channels does a QPixmap have?

  1. #1
    Join Date
    Apr 2009
    Posts
    132
    Thanks
    67
    Thanked 6 Times in 5 Posts
    Qt products
    Qt4
    Platforms
    MacOS X Unix/X11 Windows

    Question Haw many channels does a QPixmap have?

    Hi friends!

    Is it possoble to know how many channels a qpixmap have?
    I see a hasAlphaChannel() method, but no more.
    I would like to avoid black and white images (1 channel)

    Any suggestion?

    Thanks in advance.

  2. #2
    Join Date
    May 2009
    Posts
    63
    Thanks
    12
    Thanked 2 Times in 2 Posts
    Qt products
    Qt4
    Platforms
    MacOS X Windows

    Default Re: Haw many channels does a QPixmap have?

    See QPixmap::depth()

    Returns the depth of the pixmap.

    The pixmap depth is also called bits per pixel (bpp) or bit planes of a pixmap. A null pixmap has depth 0.

  3. The following user says thank you to jonks for this useful post:

    ricardo (19th July 2009)

Similar Threads

  1. Position in a QPixMap created from a QGraphicsScene
    By stevel in forum Qt Programming
    Replies: 8
    Last Post: 8th April 2009, 22:39
  2. QPixmap memory handling
    By Angelo Moriconi in forum Qt Programming
    Replies: 0
    Last Post: 1st December 2008, 15:37
  3. QPixmap bug under Qt4.3.1 ?
    By Nyphel in forum Qt Programming
    Replies: 8
    Last Post: 7th October 2007, 17:04
  4. QPixmap -> HICON trouble.
    By krivenok in forum Qt Programming
    Replies: 1
    Last Post: 11th August 2006, 15:51
  5. QPixmap and HBITMAP
    By ToddAtWSU in forum Qt Programming
    Replies: 1
    Last Post: 21st June 2006, 16:24

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
  •  
Digia, Qt and their respective logos are trademarks of Digia Plc in Finland and/or other countries worldwide.