Results 1 to 3 of 3

Thread: how to fill color to the png image file's Alpha channel

  1. #1
    Join Date
    May 2010
    Location
    China
    Posts
    66
    Thanks
    8
    Qt products
    Qt4
    Platforms
    Windows

    Default how to fill color to the png image file's Alpha channel

    i am using QBrush filled with
    Qt Code:
    1. Qt::TexturePattern
    To copy to clipboard, switch view to plain text mode 
    to draw QGraphicsItem and i want to to fill color to the png image file's Alpha channel with custorm color at runtime.
    and i want to know if there is other way to slove this problem without png format picture format/

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

    Default Re: how to fill color to the png image file's Alpha channel

    How does your drawing code look like?
    Which kind of paint device are you drawing on?

    Cheers,
    _

  3. #3
    Join Date
    May 2010
    Location
    China
    Posts
    66
    Thanks
    8
    Qt products
    Qt4
    Platforms
    Windows

    Default Re: how to fill color to the png image file's Alpha channel

    i use the code like this
    Qt Code:
    1. QBrush *brush=new QBrush(":/images/12.png");
    To copy to clipboard, switch view to plain text mode 

Similar Threads

  1. Replies: 0
    Last Post: 9th January 2013, 09:41
  2. Replies: 1
    Last Post: 15th August 2012, 18:00
  3. Replies: 1
    Last Post: 9th May 2011, 15:19
  4. Replies: 1
    Last Post: 28th April 2011, 02:13
  5. Changing brightness & contrast of image with alpha channel
    By Thomas_Lerman in forum Qt Programming
    Replies: 4
    Last Post: 25th March 2011, 15:33

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.