Business
Jobs
  • About Us
  • Solutions
    • Job Postings
      Post your job and receive qualified candidates in 48h.
    • Candidate Assessments
      500+ technical and psychological tests, plus anti-fraud.
    • Headhunting
      Tailor-made executive search from start to finish.
    • Payroll + EOR
      Payroll dispersal and EOR across 15+ LATAM countries.
  • Pricing
  • Jobs

0

184
Views
How can I add the values in an array to the Point in C#?

This is an representative imageI am trying to write the data as points for processing the image and I have an array which is full with the values as [r1,g1,b1,r2,g2,b2...].I mean this is a black and white image and I wrote the pixels in order(like:[255,255,255,000,000,000.....]) but I need to write the values as point for performing an algorithm.I tried to write the code but could not do this in the right way.

What I want is like -> result[i]=point(x,y).Is writing this code possible?What am I doing wrong with this code?

EDIT:I am trying to write a morphological algorithm(For writing Graham scan I need to find the points).I am triying to send the data as width(datawidth * 3 because it is in rgb format) and width.With this way I am trying to send 'width * 3' to x-coordinate and when I send it y-coordinate is gonna be 0 and when I send the second 'width * 3' y-coordinate is gonna be 1 and sorth of.That is what I am thinking about the code.

Here is the code:

List<Point> points = new List<Point>();
            
            for (int i = 0; i < 500; i++)
            {
                byte dnm = 0;
                for (int d = 0; d < 800*3; d++)
                {
                    points(i,d)= result[dnm];
                    dnm++;
                }
                dnm++;
            }
over 4 years ago · Santiago Trujillo
Answer question
Find remote jobs

Discover the new way to find a job!

Top jobs
Top job categories
Business
Post vacancy Pricing Sales
Legal
Terms and conditions Privacy policy
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Show me some job opportunities
There's an error!