Results 1 to 5 of 5

Thread: QtQuick2 access image pixel

  1. #1
    Join Date
    Dec 2008
    Location
    Poland
    Posts
    383
    Thanks
    52
    Thanked 42 Times in 42 Posts
    Qt products
    Qt4
    Platforms
    MacOS X Unix/X11 Windows Android

    Default QtQuick2 access image pixel

    Hello,
    I have QML Image element in view.
    What I want to do is onPress event I want to read pixel value of the loaded image.

    How should I proceed with QtQuick2?

    Regards
    In the near future - corporate networks reach out to the stars. Electrons and light flow throughout the universe.
    The advance of computerization however, has not yet wiped out nations and ethnic groups.

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

    Default Re: QtQuick2 access image pixel

    Quote Originally Posted by Talei View Post
    How should I proceed with QtQuick2?
    You shouldn't.
    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.


  3. #3
    Join Date
    Dec 2008
    Location
    Poland
    Posts
    383
    Thanks
    52
    Thanked 42 Times in 42 Posts
    Qt products
    Qt4
    Platforms
    MacOS X Unix/X11 Windows Android

    Default Re: QtQuick2 access image pixel

    So in that case, how to interact with pixels from QtQuick2. Lets say I want to get value of the pixel on the image that user click on.
    In the near future - corporate networks reach out to the stars. Electrons and light flow throughout the universe.
    The advance of computerization however, has not yet wiped out nations and ethnic groups.

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

    Default Re: QtQuick2 access image pixel

    Quote Originally Posted by Talei View Post
    So in that case, how to interact with pixels from QtQuick2.
    You can't. If you want to work on pixels, fall back to Qt/C++.
    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.


  5. #5
    Join Date
    Jan 2011
    Posts
    127
    Thanks
    42
    Thanked 4 Times in 4 Posts
    Qt products
    Qt4
    Platforms
    Windows

    Default Re: QtQuick2 access image pixel

    Maybe you could calculate the position of the x, y of mouse from qml
    then use Qt/c++ to load the image and print out the value according to the x, y position
    Last edited by stereoMatching; 3rd June 2013 at 09:10.

Similar Threads

  1. Replies: 2
    Last Post: 16th February 2012, 23:10
  2. Replies: 3
    Last Post: 25th September 2011, 11:04
  3. Select pixel from image
    By sergio87 in forum Qt Programming
    Replies: 4
    Last Post: 2nd May 2011, 11:48
  4. Replies: 3
    Last Post: 12th November 2010, 17:08
  5. QImage direct pixel access.
    By hickscorp in forum Qt Programming
    Replies: 3
    Last Post: 7th May 2010, 10:23

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.