Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
如何在 C# 中加载 pgm 图像以及如何将其转换为 pgm 文件?
我找到了一个博客条目,其中包含为您将 PGM 文件转换为 BMP 文件的代码。我不得不使用谷歌翻译来阅读页面,但列出的代码是英文的,看起来不错。这是链接(使用翻译):
http://translate.google.com/translate?hl=en&sl=zh-CN&u=http://kb.cnblogs.com/a/1266417/&ei=fkbmTYqRMoe4twfq_PDeCg&sa=X&oi=translate&ct=result&resnum=6&ved=0CFAQ7gEwBQ&prev=/search %3Fq%3Dc%2523%2Bconvert%2Bpgm%26hl%3Den%26prmd%3Divns
基本上,只需复制并粘贴此代码。该BitmapToBitmap()方法是您要调用的方法。
BitmapToBitmap()