Click here to Skip to main content
15,890,506 members
Please Sign up or sign in to vote.
1.00/5 (1 vote)
See more:
hello everybody;

i want a simple code in visual c# to read an image ,i mean convert an image into an array(r,g,b) simply
in order to deal with it later using image processing algorithms.
i want this code to teach it for my student , it is very simple in vb6.
so please help me...
thank you all ...
ahmed
Posted
Updated 15-Apr-13 2:59am
v2

1 solution

Use Image.LockBits method. Sample code at documentation page[^].
 
Share this answer
 
Comments
Sergey Alexandrovich Kryukov 15-Apr-13 11:28am    
Fair enough, my 5, but I would rather delete the OP's post immediately, as not a question.
—SA
CPallini 15-Apr-13 11:37am    
Thank you.
I think we should try to help (if possible), even if the question isn't good or clear (or even not-a-question!).
Sergey Alexandrovich Kryukov 15-Apr-13 12:20pm    
Well, I would agree about "not clear", and sometimes I even do help even when the post is not a question, but I think we are already overwhelmed with non-questions (you many not see all of them because I already removed many), so it's bad to encourage bad behavior. And if posting non-question was a casual mistake or a person is new to the forum, she or he can legitimately re-post it, after reading "sorry, this is not a question" comment. Do you see my point?

I remember I tried to suggest some more complex schema to Chris Maunder, but he convinced me with "just delete it immediately". Not-enough-information posts are even harder. Did you notice that huge percent of inquirers providing not enough information and asked for extra information just abandon the threads? Such ignorance is pretty bad. I try to delete such threads when I occasionally face with them, but they are hard to detect; nobody would like to visit old posts.

Sometimes experts blame inquirers to failure to search this forum for an answer, but frankly, it is overwhelmed with trash.

—SA
CPallini 15-Apr-13 14:01pm    
I see your point. I'm torn between two dispositions: (1) Make the Question useful as reference. (2) Just being helpful.
Point (2) prevents me from deleting questions.
Sergey Alexandrovich Kryukov 15-Apr-13 14:23pm    
I have a final comment which may alleviate the burden of #2 (:-): a person who was unable to formulate a post as a question when a forum is called "Quick Questions & Answers" and feel too offended to put a better post later, in response to the "Sorry, not a question comment" might be a pretty hopeless target to help.

I would prefer to dedicate more time to a user who really deserve help. By answering bad "questions", we sometime do it at the expense of mode promising members. How about that? You probably note that sometimes I'm not afraid of spending my time for answering a question in detail when I hope that the inquirer can really use it. Why? By saving some time on bad inquirers. It all has its back flip of a coin...

—SA

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