in Education by
Looking for one that is fast enough and still graceful with memory. The image is a 24bpp System.Drawing.Bitmap. JavaScript questions and answers, JavaScript questions pdf, JavaScript question bank, JavaScript questions and answers pdf, mcq on JavaScript pdf, JavaScript questions and solutions, JavaScript mcq Test , Interview JavaScript questions, JavaScript Questions for Interview, JavaScript MCQ (Multiple Choice Questions)

1 Answer

0 votes
by
If you need an exact number, then you are going to have to loop over all of the pixels. Probably storing the color and a count in a hash is the best way to go because of the sparseness of the colors. Using the Color.ToArgb() in the hash instead of the color object would probably be a good idea too. Also, if speed is a major concern, you don't want to use a function like GetPixel(x, y) -- instead try to process chunks at a time (row a time). If you can, get a pointer to the beginning of the image memory and do it unsafe.

Related questions

0 votes
    Looking for one that is fast enough and still graceful with memory. The image is a 24bpp System.Drawing. ... Questions for Interview, JavaScript MCQ (Multiple Choice Questions)...
asked Mar 17, 2022 in Education by JackTerrance
0 votes
    Looking for one that is fast enough and still graceful with memory. The image is a 24bpp System.Drawing. ... Questions for Interview, JavaScript MCQ (Multiple Choice Questions)...
asked Mar 17, 2022 in Education by JackTerrance
0 votes
    Looking for one that is fast enough and still graceful with memory. The image is a 24bpp System.Drawing. ... Questions for Interview, JavaScript MCQ (Multiple Choice Questions)...
asked Mar 17, 2022 in Education by JackTerrance
0 votes
    Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers. Want ... Questions for Interview, JavaScript MCQ (Multiple Choice Questions)...
asked Mar 25, 2022 in Education by JackTerrance
0 votes
    Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers. Want ... Questions for Interview, JavaScript MCQ (Multiple Choice Questions)...
asked Mar 25, 2022 in Education by JackTerrance
0 votes
    Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers. Want ... Questions for Interview, JavaScript MCQ (Multiple Choice Questions)...
asked Mar 24, 2022 in Education by JackTerrance
0 votes
    Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers. Want ... Questions for Interview, JavaScript MCQ (Multiple Choice Questions)...
asked Mar 24, 2022 in Education by JackTerrance
0 votes
    I have a dataframe: > myvec name order_no 1 Nehal 12 2 sejal 14 3 sejal 16 4 shyam 11 5 Nehal 12 6 Sejal 16 ... Sejal 3 Shyam 1 Ram 1 Select the correct answer from above options...
asked Jan 23, 2022 in Education by JackTerrance
0 votes
    Background: I'm trying to look through assets in an old game's archive files. They're 8-bit. I ... , JavaScript Questions for Interview, JavaScript MCQ (Multiple Choice Questions)...
asked May 4, 2022 in Education by JackTerrance
0 votes
    ____________________ is a mathematical algorithm that produces a unique plain text for a given cipher text along ... Security:,Cyber Security-Jobs:,Cyber Security Applications...
asked Oct 31, 2021 in Education by JackTerrance
0 votes
    I have a vector of numbers: numbers...
asked Feb 1, 2022 in Education by JackTerrance
0 votes
    write an algorithm to accept an integer number and print the factors of it Select the correct answer from above options...
asked Nov 27, 2021 in Education by JackTerrance
0 votes
    1. The octal number system has ___________ unique digits. 2.The digits 0 and 1 are called _________ in binary number ... 0 to ______. Select the correct answer from above options...
asked Dec 24, 2021 in Education by JackTerrance
0 votes
    In an CRT or LCD monitor, the following three colors are used to form all of the other colors: yellow orange red blue violet green...
asked May 9, 2021 in General by JackTerrance
0 votes
    At the time of voting and counting of votes, the official representatives of political parties remain present. Please answer the above question....
asked Aug 14, 2022 in Education by JackTerrance
...