PGM を XBM に変換
端末内ですべて処理しています — 大きなファイルは少し時間がかかる場合があります。
PGM はグレースケールの portable graymap です。ヘッダーと輝度値だけという単純な構造で、画像処理の教材にも使われます。 X11 由来の白黒アイコンを PNG に変換します。
変換のすべてが端末上で完結するため、瞬時に、無制限に、そして本当にプライベート — アカウントも透かしも、サーバーに置かれるファイルもありません。複数ファイルをまとめて変換できます。
How PGM compares to XBM
| PGM | XBM | |
|---|---|---|
| Structure | P2 (ASCII) / P5 (binary) header + samples | C #defines + hex byte array |
| Types / schema | 8/16-bit grayscale | 1-bit, X11 bit order |
| Compatibility | netpbm, OpenCV, MATLAB | X11, C compilers, GTK |
| Best for | Research pipelines, raw luminance | Compiled-in cursors and icons |
PGM を XBM に変換する方法
- 1
ファイルを選択
PGM ファイルを上のエリアにドラッグ&ドロップするか、クリックして選択してください。複数ファイルを同時に追加して一括変換できます。
- 2
即座に変換
「XBM に変換」をクリックしてください。変換は WebAssembly を使ってブラウザ内で完結します — アップロードも待ち行列もありません。
- 3
結果をダウンロード
変換された XBM ファイルを個別に、またはまとめて ZIP でダウンロードできます。
PGM 形式について
PGM is netpbm's grayscale format: a two-line text header, then raw 8 or 16-bit luminance samples with no compression and no metadata. That raw honesty made it the default exchange format of computer-vision research, image-processing coursework and any pipeline where "what you read is exactly the pixel value" matters.
Converting PGM to PNG or JPG just normalizes it for humans; converting back down preserves every value bit-exactly when the pipeline needs numbers, not pictures.
+長所
- ✓Bit-exact pixel values, no color management surprises
- ✓16-bit depth support
- ✓Trivially parseable
!短所
- −No compression — large files
- −Grayscale only
- −No embedded metadata
XBM 形式について
XBM is the most honest image format ever shipped: the "file" is a C source array of hex bytes, compiled straight into X11 applications as cursor and icon bitmaps. Rendered, it is 1-bit black and white — the ancestors of every pixel-art cursor you still use.
Because it compiles, XBM never died: firmware UIs, embedded icons and retro Unix tooling still want it. Converting a PNG down to XBM gives embeddable, compilable art; the other direction previews what the C array actually draws.
+長所
- ✓Compiles directly into C/C++ programs
- ✓Zero-payload format — text only
- ✓Still required by embedded and Unix tooling
!短所
- −1-bit black & white only
- −Human-hostile representation
- −X11 bit order trips up hand-rolled decoders
PGM を XBM に変換する理由
どの形式がこの仕事に向いているかを考えるより、まず正しいコンテナに移すのが近道です。No compression — large files XBM ならこう動きます:Compiles directly into C/C++ programs これが求めているものなら、変換を実行してください。数秒で完了し、ファイルは端末から出ません。
よくある質問
Is this PGM to XBM converter really free?
Yes — completely free, with no sign-up, no watermark and no daily conversion limits. The site is supported by advertising.
Are my files uploaded to a server?
No. The conversion runs entirely inside your browser using WebAssembly, so your files never leave your device — that is what makes it instant and private.
Does it work on Windows, Mac, iPhone and Android?
Yes. Anything with a modern browser works: Windows, macOS, Linux, Android and iOS. No software installation is required.
Will I lose quality converting PGM to XBM?
No — XBM is a lossless format, so every pixel of the converted image matches your original PGM file. You can also adjust the quality/size balance before converting when the target format supports compression.
EXIF データは残りますか?
通常は再エンコード時に削除されます。位置情報などのメタデータを残したい場合は、EXIF 保持に対応した出力形式をお選びください。
透明背景は保持されますか?
出力形式が対応していれば保持されます(PNG・WebP・AVIF など)。JPEG は透明を白で塗りつぶすため、透明が必要なら PNG をお選びください。