Convert Image to Matrix

I want to convert image(ex .bmp or .jpg ...) to binary matrix.
When image was loaded,I want to convert it to array as a matrix.At black point is 1 and white point is 0.

In Windows you can use GetDIBits() (http://msdn.microsoft.com/en-us/library/dd144879(VS.85).aspx ). If other, then I don't know.
Topic archived. No new replies allowed.