如何读取二维双阵列在C语言的.PGM图像文件阵列、图像文件、语言、PGM

2023-09-07 13:03:56 作者:别做逃兵

现在的问题很简单:如何阅读.PGM图像文件转换成2D双阵列中的C.我没有在内存中的.PGM缓冲区。我想从磁盘到内存中读取它。

The question is quite simple: How to read a .pgm image file into a 2D double array in C. I do not have a .pgm buffer in memory. I would like to read it from the disk into memory.

难道真的AP preciate如果我能得到一个code段。谢谢你。

Would really appreciate if I could get a code snippet. Thank You.

推荐答案

您可能不会得到别人写你所有的code,但这里有可能你指出正确的方向前进了一些有用的链接:

You probably won't get someone writing you all the code, but here are some useful links that might point you in the right direction:

pgm.c pgm.h PGM格式规范 http://www.cplusplus.com/forum/general/2393/ pgm.c pgm.h PGM Format Specification http://www.cplusplus.com/forum/general/2393/