Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 3397124
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 18, 20262026-05-18T04:29:26+00:00 2026-05-18T04:29:26+00:00

I’m supposed to create this RBG parade project in WPF, but I have no

  • 0

I’m supposed to create this RBG parade project in WPF, but I have no idea where to start. It should handle images in 720p settings (1280×720). Any idea on where to start, I’m completely clueless. I don’t want the whole project just a few pointers.

Thank you.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-18T04:29:26+00:00Added an answer on May 18, 2026 at 4:29 am

    Ok, this is what I came up with, I’m sure there’s a better solution but it works:

    public ObservableCollection<double> RPercentPerColumn { get; set; }
    public ObservableCollection<double> GPercentPerColumn { get; set; }
    public ObservableCollection<double> BPercentPerColumn { get; set; }
    
    private int[] GetImagePixels(ref int imageHeight, ref int imageWidth)
    {
        BitmapImage image = new BitmapImage(new Uri(this.CurrentImageFile, UriKind.Absolute));
    
        WriteableBitmap bmp = new WriteableBitmap(image);
    
        int rows = bmp.PixelHeight;
        int columns = bmp.PixelWidth;
    
        int[] pixels = new int[bmp.PixelWidth * bmp.PixelHeight];
    
        bmp.CopyPixels(pixels, columns * 4, 0);
    
        imageHeight = bmp.PixelHeight;
        imageWidth = bmp.PixelWidth;
    
        return pixels;
    }
    
    private void ClearAllData()
    {
        this.RPercentPerColumn.Clear();
        this.GPercentPerColumn.Clear();
        this.BPercentPerColumn.Clear();
    }
    
    public void ProcessRGBParade()
    {
        if (string.IsNullOrEmpty(this.CurrentImageFile))
            return;
    
        ClearAllData();
    
        int columns = 0;
        int rows = 0;
    
        int[] pixels = GetImagePixels(ref rows, ref columns);
    
        int column = 0;
        int row = 0;
    
        int redColumnTotal = 0;
        int greenColumnTotal = 0;
        int blueColumnTotal = 0;
        int currentPixel = 0;
    
        double totalColorInColumn = 0;
    
        double redIntensity = 0;
        double greenIntensity = 0;
        double blueIntensity = 0;
    
        int r = 0;
        int g = 0;
        int b = 0;
    
        // logic to calculate intensity
        for (int i = 0; i < pixels.Length; i ++)
        {
            row++;
    
            r = (pixels[currentPixel] & 0x00FF0000) >> 16;
            g = (pixels[currentPixel] & 0x0000FF00) >> 8;
            b = (pixels[currentPixel] & 0x000000FF);
    
            redColumnTotal += r;
            greenColumnTotal += g;
            blueColumnTotal += b;
    
            totalColorInColumn += r + g + b;
    
            if (row == rows)
            {
                row = 0;
                column++;
    
                currentPixel = column;
    
                redIntensity = (redColumnTotal / totalColorInColumn) * 100;
                greenIntensity = (greenColumnTotal / totalColorInColumn) * 100;
                blueIntensity = (blueColumnTotal / totalColorInColumn) * 100;
    
                RPercentPerColumn.Add(double.IsNaN(redIntensity) ? 0 : redIntensity);
                GPercentPerColumn.Add(double.IsNaN(greenIntensity) ? 0 : greenIntensity);
                BPercentPerColumn.Add(double.IsNaN(blueIntensity) ? 0 : blueIntensity);
    
                redColumnTotal = 0;
                greenColumnTotal = 0;
                blueColumnTotal = 0;
    
                totalColorInColumn = 0;
            }
            else
            {
                currentPixel += columns;
            }
        }
    }
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have a string like this: La Torre Eiffel paragonata all&#8217;Everest What PHP function
this is what i have right now Drawing an RSS feed into the php,
I have this code to decode numeric html entities to the UTF8 equivalent character.
I have a French site that I want to parse, but am running into
I'm parsing an RSS feed that has an &#8217; in it. SimpleXML turns this
I have this code: - (void)parser:(NSXMLParser *)parser foundCDATA:(NSData *)CDATABlock { NSString *someString = [[NSString
I have some data like this: 1 2 3 4 5 9 2 6
link Im having trouble converting the html entites into html characters, (&# 8217;) i
I have just tried to save a simple *.rtf file with some websites and
I want to count how many characters a certain string has in PHP, but

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.