Qt Forum

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

    Update: Forum Guidelines & Code of Conduct

    [Solved]Access the pixels of the Image(qml2)

    QML and Qt Quick
    2
    5
    1039
    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
      stereomatching last edited by

      How could I access the pixels of the Image?
      Is it possible to manipulate them directly from c++ site?
      The results should reflect on the qml site

      using shaderEffects could do some image processing tasks
      but when I need to do more sophisticated tasks, it is not
      enough to handle it.

      1 Reply Last reply Reply Quote 0
      • J
        Jens last edited by

        This is what custom image providers are for.
        See http://qt-project.org/doc/qt-5.0/qtquick/qquickimageprovider.html

        In qml you simply specify a custom URL to access the image and you create it entirely on the C++ side.

        1 Reply Last reply Reply Quote 0
        • S
          stereomatching last edited by

          Thanks Jens, the document in QtCreator are fine(5.1RC), but the link you
          give me, the example is broken.

          1 Reply Last reply Reply Quote 0
          • J
            Jens last edited by

            Try the docs for 5.1 rc perhaps. In any case there is a separate thread on the forum for this:
            http://qt-project.org/forums/viewthread/29227/

            1 Reply Last reply Reply Quote 0
            • S
              stereomatching last edited by

              I tried it, not really the class I need, but it is good to know there are a tool
              like that exist. It is not suit for my need because the image have to repaint
              when specific properties change(interval, minimum slope etc), so I design
              a custom image by QQuickPaintedItem.

              The next experiment is try to use the gpu and cpu together to render the
              image and show them on the qml scene, lot of things have to learn.However,
              process the image is fun, it is even more interesting to play it with Qt.

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