Click here to Skip to main content
15,890,506 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
hello!)
I am sorry for the twisted English)
Prompt me, please, what methods it is possible to execute the division of image on the squares of the set size, for example on 10rkh? And as is it then possible to define the color of these parts of image?
Project on Windows Forms on C#
Posted
Comments
Sergey Alexandrovich Kryukov 27-Dec-11 14:43pm    
What does it mean "define the color"? What is "rkh"?
--SA

The question is not clear at all (please see my comments to the question), but in all such cases you should work using System.Drawing.Bitmap and System.Drawing.Bitmap.LockBits to access image data.

See this, with code samples: http://msdn.microsoft.com/en-us/library/system.drawing.bitmap.lockbits.aspx[^].

Due to performance issues, you should avoid using GetPixel/SetPixel by all means, unless this is just a couple pixels or so.

See also this article for the detailed explanations: http://www.bobpowell.net/lockingbits.htm[^].

—SA
 
Share this answer
 
I want to get a primary color for this square, that color which most in a current square. is such possible?
 
Share this answer
 
Comments
RaviRanjanKr 27-Dec-11 17:56pm    
A suggestion :- you can use Have a question or Comment button to drop your message and to get Immediate response instead of posting as answer.

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900