Qt Forum

    • Login
    • Search
    • Categories
    • Recent
    • Tags
    • Popular
    • Users
    • Groups
    • Search
    • Unsolved

    Manipulating Images

    General and Desktop
    3
    4
    3437
    Loading More Posts
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes
    Reply
    • Reply as topic
    Log in to reply
    This topic has been deleted. Only users with topic management privileges can see it.
    • S
      Sorin last edited by

      How can I modify an image at runtime?. Lets say that I want to paint a part of the image with a different color. Since I'm new on Qt a small basic example would be appreciated :) . Thanks!

      There are only 10 types of people in the world: Those who understand binary, and those who don't

      1 Reply Last reply Reply Quote 0
      • T
        tony last edited by

        Hi,

        check the documentation regarding the class "QImage":http://doc.qt.nokia.com/4.7/qimage.html

        Tony.

        1 Reply Last reply Reply Quote 0
        • D
          danilocesar last edited by

          Just complementing what Antonio said:

          You can use "QPainter APIs":http://doc.trolltech.com/4.6-snapshot/qpainter.html to paint whatever you want to in any QPaintDevice (QImage, QPicture, QPixmap and QPrinter are examples of paint devices).

          Just open your QPainter on an image:

          @QPainter p(myImage);@

          and than paint something on it

          "p->drawElipse":http://doc.trolltech.com/4.6-snapshot/qpainter.html#drawEllipse
          "p->drawImage":http://doc.trolltech.com/4.6-snapshot/qpainter.html#drawImage-8
          etc...

          <a href="http://www.danilocesar.com">Danilo Cesar Lemes de Paula</a>
          Software Engineer

          1 Reply Last reply Reply Quote 0
          • ?
            Guest last edited by

            you can do a whole bunch of stuff on images as others have already replied. you can apply effects, you can do custom painting on top of it, or you can run through individual pixels in the image and modify them how ever you want, see one example I just created in this "wiki page":http://developer.qt.nokia.com/wiki/Manipulate_image_and_apply_RGB_mask

            1 Reply Last reply Reply Quote 0
            • First post
              Last post