Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. QML and Qt Quick
  4. [Solved]Access the pixels of the Image(qml2)
QtWS25 Last Chance

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

Scheduled Pinned Locked Moved QML and Qt Quick
5 Posts 2 Posters 1.3k Views
  • 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 Offline
    S Offline
    stereomatching
    wrote on last edited by
    #1

    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
    0
    • J Offline
      J Offline
      Jens
      wrote on last edited by
      #2

      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
      0
      • S Offline
        S Offline
        stereomatching
        wrote on last edited by
        #3

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

        1 Reply Last reply
        0
        • J Offline
          J Offline
          Jens
          wrote on last edited by
          #4

          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
          0
          • S Offline
            S Offline
            stereomatching
            wrote on last edited by
            #5

            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
            0

            • Login

            • Login or register to search.
            • First post
              Last post
            0
            • Categories
            • Recent
            • Tags
            • Popular
            • Users
            • Groups
            • Search
            • Get Qt Extensions
            • Unsolved