Pular para o conteúdo principal
🇬🇧 English 🇪🇸 Español 🇩🇪 Deutsch
Conversor de imagens Conversor de vídeo Conversor de áudio Conversor de documentos
Ferramentas Guias Formatos Preços API
Entrar
PGM file
pgm
Formato de arquivo

Sobre os arquivos PGM

PGM Imagem em Tons de Cinza

Lançado em 1988 Por Jef Poskanzer

Portable Gray Map — formato simples para imagens em tons de cinza desenvolvido por Netpbm. Sem compressão, fácil de processar programaticamente. Usado em visão computacional e processamento de imagem técnico.

Família

Raster & Vector Images

Extensão

.pgm

Tipo MIME

image/x-portable-graymap

Pode ser usado como

Entrada Saída
A história

COMO NASCEU O
FORMATO PGM.

PGM — Portable GrayMap — is the grayscale sibling of PBM and PPM in Jef Poskanzer’s 1988 Netpbm toolkit. Where PBM stores 1-bit black-or-white pixels, PGM stores 8-bit (values 0-255) or 16-bit (0-65535) grayscale values. Like its sibling formats, PGM comes in ASCII (P2) and binary (P5) variants, and shares the same stupidly simple header: magic number, width, height, max value, then pixel data.

PGM has been the Unix grayscale intermediate format since shell pipelines needed one. OCR engines (Tesseract) preprocess scanned documents to PGM before recognition. Medical imaging pipelines convert DICOM images to PGM for ImageMagick processing. Machine-vision and photogrammetry tools exchange depth maps as 16-bit PGM. It’s a format that refuses to die because its simplicity is its best feature.

CURIOSIDADES E
FATOS INTERESSANTES.

01

Tesseract OCR's preferred input format is PGM — every "scan to text" pipeline on Linux preprocesses through it.

02

Medical imaging workflows use 16-bit PGM to preserve the 12-bit output of X-ray and MRI scanners during intermediate processing.

03

A grayscale photo compresses 8× better as a 1-bit PBM if you dither it — but loses all tonal detail.

04

Machine-vision systems exchange depth maps as 16-bit PGM because the single-channel grayscale fits depth values naturally.

05

The P2 (ASCII) and P5 (binary) magic numbers are the only difference between two structurally identical file variants.

VANTAGENS E
LIMITAÇÕES.

Vantagens

  • Trivially simple to parse and generate.
  • Ideal Unix pipeline intermediate for grayscale processing.
  • Preserves 16-bit depth for scientific and medical data.
  • Universal tooling (Netpbm, ImageMagick, Tesseract).
  • ASCII variant is human-readable.

Limitações

  • No compression — files balloon for large images.
  • No metadata, no color profile.
  • Grayscale only — drop to PBM for bitmap or up to PPM for color.
  • Not a delivery format — strictly pipeline intermediate.

Tamanhos típicos de arquivo

1920×1080 grayscale 8-bit (binary P5)

~2 MB

1920×1080 grayscale 16-bit

~4 MB

DICOM-equivalent medical slice

500 KB - 20 MB

Especificações técnicas

MIME type
image/x-portable-graymap
Extension
.pgm
Variants
P2 (ASCII), P5 (binary)
Bit depth
8-bit or 16-bit per pixel
Creator
Jef Poskanzer (1988), Netpbm toolkit

CONVERTER A PARTIR DE
PGM

Casos de uso comuns

Scientific imaging, machine vision

Formatos relacionados

Comparativos populares

Conversões populares de PGM

Os destinos mais procurados ao converter arquivos PGM.

Perguntas frequentes sobre PGM

Perguntas frequentes

PGM (PGM Grayscale Image) is an image formato used to store raster graphics — a two-dimensional grid of pixels describing a picture. It is part of the raster & vector images family e designed around a specific trade-off between tamanho do arquivo, visual fidelity, e feature support (transparency, colour depth, compressão type). Photographers, web designers, e content creators choose PGM when its particular strengths match the publishing target.

Most desktop photo viewers (Windows Photos, macOS Preview, GIMP, Photoshop, Affinity Photo) abrir PGM natively. On mobile, iOS Photos e Google Photos display PGM no gallery when suportado por the OS. If the formato is rare ou new, converter to JPG ou PNG first — both are universally readable — usando our PGM to JPG ou PGM to PNG converter.

Upload the PGM to KaijuConverter e pick a target formato (JPG, PNG, WebP, HEIC, TIFF, BMP, SVG, PDF). The conversion runs in o navegador via ImageMagick e returns a baixar in seconds. No account ou installation required; both input e output delete automatically within two hours.

Depende de the task. JPG is the smallest tamanho do arquivo para photographs; PNG is sem perdas com transparência; PGM has its own niche that may favour colour depth, animation, ou codificação efficiency over one ou both of those. para the final web publish, test all three e measure tamanho do arquivo plus visible quality on real content.

Usamos cookies e tecnologias similares para personalizar conteúdo e anúncios, e para analisar o tráfego. Mais informações sobre cookies.