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. QColorMap: Pseudo colors with Qt
Forum Updated to NodeBB v4.3 + New Features

QColorMap: Pseudo colors with Qt

Scheduled Pinned Locked Moved Unsolved General and Desktop
4 Posts 2 Posters 2.2k 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.
  • QtAndrewQ Offline
    QtAndrewQ Offline
    QtAndrew
    wrote on last edited by QtAndrew
    #1

    Hello,
    i want to apply "false colors" or "pseudo colors" onto a grayscale QImage but i didn't find any adequate way to do this...? Is there any support apart from writing a native QColor vector and change the color for every pixel i paint?

    alt text

    I cannot find any examples for QColorMap

    raven-worxR 1 Reply Last reply
    0
    • QtAndrewQ QtAndrew

      Hello,
      i want to apply "false colors" or "pseudo colors" onto a grayscale QImage but i didn't find any adequate way to do this...? Is there any support apart from writing a native QColor vector and change the color for every pixel i paint?

      alt text

      I cannot find any examples for QColorMap

      raven-worxR Offline
      raven-worxR Offline
      raven-worx
      Moderators
      wrote on last edited by
      #2

      @QtAndrew
      I haven tested it but worth a try, since your screenshot lets me assume you anyway want to show max. 256 colors?

      First convert the QImage to QImage::Format_Indexed8 format, then iterate over the image's color-table and replace the colors based on their value with your colors.

      --- SUPPORT REQUESTS VIA CHAT WILL BE IGNORED ---
      If you have a question please use the forum so others can benefit from the solution in the future

      1 Reply Last reply
      0
      • QtAndrewQ Offline
        QtAndrewQ Offline
        QtAndrew
        wrote on last edited by
        #3

        this is the classical was, but i develop on an embedded device and ask me if there is no other way to directely do this in qt.

        1 Reply Last reply
        0
        • QtAndrewQ Offline
          QtAndrewQ Offline
          QtAndrew
          wrote on last edited by
          #4

          So after all the Research i have implemented this function yb my own, there is no native Support for pseudo Colors as far i have seen...

          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