By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
424,681 Members | 1,854 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 424,681 IT Pros & Developers. It's quick & easy.

Parsing an bitmap image and extracting pixel info (what color it i

P: n/a
Hello Again,

Here is what I want to do:

I have an image that is 100 px by 100 px

I want to parse each pixel in said image, and store the color of that pixel
in a file

(the reasons for this don't really matter)

Can I parse the image (using a stream?) to get the information I need?

Thanks in advance

Corey
Jul 21 '05 #1
Share this Question
Share on Google+
2 Replies


P: n/a
Sure, open up the file as a binary file, read in the bytes. Then look at
the bitmap file format to decide where to start reading in the colors and
such.

Bitmap file format:
http://www.google.com/search?hl=en&q...=Google+Search

Chris
"CoreyMas" <Co******@discussions.microsoft.com> wrote in message
news:1E**********************************@microsof t.com...
Hello Again,

Here is what I want to do:

I have an image that is 100 px by 100 px

I want to parse each pixel in said image, and store the color of that
pixel
in a file

(the reasons for this don't really matter)

Can I parse the image (using a stream?) to get the information I need?

Thanks in advance

Corey

Jul 21 '05 #2

P: n/a
You can use the Bitmap.GetPixex function to get the color at a certain
pixel in the bitmap.

I'm not sure about the performance of this method though.

It may be faster to do as the other poster suggested.
Chris (Not the Master of All Things Insignificant)

Jul 21 '05 #3

This discussion thread is closed

Replies have been disabled for this discussion.