Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. General and Desktop
  4. Qlabel question - answered
Forum Updated to NodeBB v4.3 + New Features

Qlabel question - answered

Scheduled Pinned Locked Moved General and Desktop
4 Posts 3 Posters 2.5k Views 1 Watching
  • 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.
  • E Offline
    E Offline
    ewic
    wrote on last edited by
    #1

    Hi, I'm really new to QT and C++ and what I what I have is my program importing 2 separate images, but what I want to do now is to change all the pixels in one of the images by a certain degree (for instance, if a pixel is red, increase the R,G,B levels a little so it's lighter (pink in this case) and do that to all the pixels in the image).

    I just can't get my head around how to implement this. I tried stuff like QImage's setColor function but I just keep getting errors and what not and I'm just lost. If someone could show me how to implement something like what I said above, that would be fantastic. I will be sure to give you full credit if you can figure it out and help me.

    <<<Sidenote: My goal of this program is to eventually do a histogram equalization operation where you take the 2nd image's histogram data and apply it to the pixels of the 1st image. If you guys have any leads on that, it would be greatly appreciated as well.>>>

    Here's the whole project folder to try and run it:

    "folder":http://www.gamefront.com/files/20965594/ewics+program.zip

    Thank you for your time!

    1 Reply Last reply
    0
    • K Offline
      K Offline
      Kxyu
      wrote on last edited by
      #2

      such things happen when you use copy-paste method, so you should consider avoiding this style. You forgot to instatiate second QLabel, so the pointer imageLabel2 points just to some gibberish in memory.

      P.S. When you press F5 (debug) and your application fails, Qt Creator shows you the exact string with an error

      1 Reply Last reply
      0
      • E Offline
        E Offline
        ewic
        wrote on last edited by
        #3

        Oh thanks a bunch man! I figured it all out and I can now input 2 images! :)

        Edit: New Question Added to OP!

        1 Reply Last reply
        0
        • G Offline
          G Offline
          goetz
          wrote on last edited by
          #4

          Please open new threads for new questions, thanks.

          http://www.catb.org/~esr/faqs/smart-questions.html

          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