Get Help:Ask a Question in our Forums|Report a Bug|More Help Resources
Last post Apr 30, 2012 12:40 PM by pradeepnt
Apr 30, 2012 05:09 AM|LINK
I am making a project in asp.net c# 4.0 and for that i need to read an image,
if the pixel color is white then put space else put a dot and save it as text file.
Apr 30, 2012 05:21 AM|LINK
You need to use the Bitmap Class:
Refer to this:
Apr 30, 2012 10:49 AM|LINK
See the below sample code.
Bitmap img = new Bitmap("file name here");
for (int i = 0; i < img.Width; i++)
for (int j = 0; j < img.Height; j++)
c = img.GetPixel(i, j);
if (c == Color.White)
//Write space to the textfile
//Write dot to the textfile
If you do not know how to write text file, please Google/Bing first. If you cannot find it, feel free to ask then.
Please 'Mark as Answer' if this post helps you.
Apr 30, 2012 12:40 PM|LINK