Results 1 to 8 of 8

Thread: how to clean data in qimage with transparent?

Hybrid View

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

    Default Re: how to clean data in qimage with transparent?

    What is the painter object working on? Is it a pixmap, a widget or what?
    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. #2
    Join Date
    Oct 2011
    Posts
    5
    Thanks
    2

    Default Re: how to clean data in qimage with transparent?

    painter works on QImage.

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

    Default Re: how to clean data in qimage with transparent?

    Why don't you just create an empty QImage and draw on that instead of clearing the one you have?
    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.


  4. #4
    Join Date
    Oct 2011
    Posts
    5
    Thanks
    2

    Default Re: how to clean data in qimage with transparent?

    In my case, I have to update the image every serveral milliseconds, only part of the image should be erased and repainted. so I think create a new QImage is infeasible.

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

    Default Re: how to clean data in qimage with transparent?

    In that case you should indeed use Clear composition mode.
    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.


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

    rolandsun (13th June 2012)

  7. #6
    Join Date
    Oct 2011
    Posts
    5
    Thanks
    2

    Default Re: how to clean data in qimage with transparent?

    Finally QPainter::CompositionMode_Source works ,thanks.

Similar Threads

  1. QImage and Qt::transparent
    By babu198649 in forum Newbie
    Replies: 11
    Last Post: 13th February 2016, 18:51
  2. QImage data via FFmpeg
    By Degenko in forum Qt Programming
    Replies: 9
    Last Post: 14th September 2010, 04:05
  3. How can I create a transparent image with QImage?
    By learning_qt in forum Qt Programming
    Replies: 1
    Last Post: 28th January 2009, 15:06
  4. clean with transparent color
    By Lele in forum Qt Programming
    Replies: 9
    Last Post: 28th October 2007, 13:45
  5. Creating a QImage from uchar* data
    By forrestfsu in forum Qt Programming
    Replies: 6
    Last Post: 8th February 2007, 15:21

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.