PGM はグレースケールの portable graymap です。ヘッダーと輝度値だけという単純な構造で、画像処理の教材にも使われます。
Typical use: 濃淡データを保つなら PGM、見るなら PNG にします。
About the PGM format
PGM は netpbm ファミリのグレースケール形式です。2 行のテキストヘッダーの後に 8/16 ビットの輝度サンプルが並び、圧縮は一切ありません。
画像処理パイプラインの中間形式として今日も使われます(OpenCV、ImageMagick が直接読み書き)。
Strengths
- ✓ 人間が読めるヘッダー
- ✓ 解析が極めて簡単
- ✓ 研究ツールが広く対応
Limitations
- ✗ ファイルが非常に大きい
- ✗ 色情報なし
- ✗ 一般のビューアは非対応
- Structure
- P5 ヘッダー + 生輝度サンプル
- Types / schema
- グレースケール 8/16 ビット
- Compatibility
- netpbm、OpenCV、ImageMagick
- Best for
- 画像処理の中間形式
Convert PGM to…
54 direct directions plus 15 workflows, sorted A–Z; 🔥 marks popular targets.
Convert other files to PGM…
Frequently asked questions
What is a PGM file?
PGM is netpbm's grayscale format — 8 or 16-bit samples, ASCII or binary, zero compression. Computer-vision research and image-processing courses live on it.
How do I convert PGM files online?
Pick a target format from the "Convert PGM to…" list below, drop your file and hit convert. Everything runs in your browser — no install, no upload, no watermark, no limits.
Is it safe to convert PGM files here?
Yes. Every conversion is performed by your own device inside the browser — files never leave for a server, and the page keeps working even offline.
Which formats can PGM convert to?
This page lists all 69 directions across documents, images, audio, video, spreadsheets and archives — each one is its own free converter page.