Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
  1. Home
  2. General Programming
  3. C#
  4. Average/dominating color in image

Average/dominating color in image

Scheduled Pinned Locked Moved C#
tutorial
4 Posts 4 Posters 0 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.
  • J Offline
    J Offline
    jafingi
    wrote on last edited by
    #1

    Hey, Is is possible to find the average (dominating) color in an image. For example it there's mostly white in the image, it should Messagebox.Show("Average Color: #FFFFFF") or MessageBox.Show("Average Color: R=255 G=255 B=255). Thanks,

    G E 2 Replies Last reply
    0
    • J jafingi

      Hey, Is is possible to find the average (dominating) color in an image. For example it there's mostly white in the image, it should Messagebox.Show("Average Color: #FFFFFF") or MessageBox.Show("Average Color: R=255 G=255 B=255). Thanks,

      G Offline
      G Offline
      Giorgi Dalakishvili
      wrote on last edited by
      #2

      It depends how you define average color :)

      Giorgi Dalakishvili #region signature my articles My blog[^] #endregion

      P 1 Reply Last reply
      0
      • G Giorgi Dalakishvili

        It depends how you define average color :)

        Giorgi Dalakishvili #region signature my articles My blog[^] #endregion

        P Offline
        P Offline
        Piyush Vaishnav
        wrote on last edited by
        #3

        There is alpha parameter. From here u can get exact decimal no.

        1 Reply Last reply
        0
        • J jafingi

          Hey, Is is possible to find the average (dominating) color in an image. For example it there's mostly white in the image, it should Messagebox.Show("Average Color: #FFFFFF") or MessageBox.Show("Average Color: R=255 G=255 B=255). Thanks,

          E Offline
          E Offline
          Ennis Ray Lynch Jr
          wrote on last edited by
          #4

          Loop through the pixels in an image and see the results. A quick hack is to scale a bitmap to 1 pixel and read the color of the only pixel which should be the average and the results will depend on the scaling algorithm. I think your question is what is the mode color?

          Need software developed? Offering C# development all over the United States, ERL GLOBAL, Inc is the only call you will have to make.
          Happiness in intelligent people is the rarest thing I know. -- Ernest Hemingway
          Most of this sig is for Google, not ego.

          1 Reply Last reply
          0
          Reply
          • Reply as topic
          Log in to reply
          • Oldest to Newest
          • Newest to Oldest
          • Most Votes


          • Login

          • Don't have an account? Register

          • Login or register to search.
          • First post
            Last post
          0
          • Categories
          • Recent
          • Tags
          • Popular
          • World
          • Users
          • Groups