read a file with both text and binary information in .Net
Posted
by Yin Zhu
on Stack Overflow
See other posts from Stack Overflow
or by Yin Zhu
Published on 2010-03-31T04:06:32Z
Indexed on
2010/03/31
4:13 UTC
Read the original article
Hit count: 410
I need to read binary PGM image files. Its format:
P5
# comments
nrows ncolumns
max-value
binary values start at this line. (totally nrows*ncolumns bytes/unsigned char)
I know how to do it in C or C++ using FILE handler by reading several lines first and read the binary block. But don't know how to do it in .Net.
© Stack Overflow or respective owner