Results 1 to 2 of 2

Thread: Is there a way to make sure the QImage load the image without alpha channel?

  1. #1
    Join Date
    Jan 2011
    Posts
    127
    Thanks
    42
    Thanked 4 Times in 4 Posts
    Qt products
    Qt4
    Platforms
    Windows

    Default Is there a way to make sure the QImage load the image without alpha channel?

    Assume there are a bunch of images come with alpha channel(rgba)
    when I load them by QImage, the QImage would load the value of alpha channel too.
    How could I order the QImage ditch the alpha channel when loading?

    Precisely, I want it to load the image as format “QImage::Format_RGB888”

  2. #2
    Join Date
    Jan 2006
    Location
    Graz, Austria
    Posts
    8,419
    Thanks
    37
    Thanked 1,545 Times in 1,495 Posts
    Qt products
    Qt3 Qt4 Qt5
    Platforms
    Unix/X11 Windows

    Default Re: Is there a way to make sure the QImage load the image without alpha channel?

    I don't think you can do that at load, but you can try loading and then convertToFormat()

    Cheers,
    _

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

    stereoMatching (24th November 2013)

Similar Threads

  1. how to fill color to the png image file's Alpha channel
    By xiongxiongchuan in forum Qt Programming
    Replies: 2
    Last Post: 10th September 2013, 11:20
  2. Replies: 0
    Last Post: 9th January 2013, 09:41
  3. QPainter to QImage , crazy alpha channel
    By firnafin in forum Qt Programming
    Replies: 0
    Last Post: 10th March 2012, 14:14
  4. Changing brightness & contrast of image with alpha channel
    By Thomas_Lerman in forum Qt Programming
    Replies: 4
    Last Post: 25th March 2011, 15:33
  5. Accessing alpha channel of QImage directly
    By spraff in forum Qt Programming
    Replies: 3
    Last Post: 19th March 2009, 16:24

Tags for this Thread

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.