Skip to main content

Load netpbm images in Pillow

Project description

pillow-netpbm

A Pillow plugin that bridges netpbm converter binaries, adding read support for dozens of legacy/obscure image formats.

Supported formats

Each format is registered as a Pillow image plugin when its converter binary is installed. Formats with magic bytes or match functions are detected by content; the rest fall back to file extension matching.

Format Converter Extensions Detection Tested
Amiga IFF ILBM ilbmtoppm .iff .ilbm .lbm match yes
Amiga Info Icon infotopam .info magic yes
ATK Raster atktopbm .raster magic yes
Atari Compressed Spectrum spctoppm .spc ext yes
Atari Degas pi1toppm .pi1 ext yes
Atari Degas Elite pc1toppm .pc1 magic yes
Atari Degas Low-Res pi3topbm .pi3 ext yes
Atari Neochrome neotoppm .neo ext yes
Atari Uncompressed Spectrum sputoppm .spu ext yes
AutoCAD Slide sldtoppm .sld magic yes
AVS X Image avstopam .avs ext yes
CMU Window Manager Bitmap cmuwmtopbm magic yes
CompuServe RLE cistopbm .cis ext yes
Fiasco Wavelet fiascotopnm .wfa .fco magic yes
FITS fitstopnm .fits .fit .fts magic yes
Garmin SRF srftopam .srf magic yes
GEM Raster gemtopnm .gem ext yes
Gould Scanner gouldtoppm .gould ext no
Group 3 Fax g3topbm .g3 ext yes
HIPS hipstopgm .hips ext no
HP PaintJet pjtoppm .pj ext yes
Interleaf leaftoppm .leaf magic yes
JBIG jbigtopnm .jbig .jbg .bie ext yes
Lisp Machine Bitmap lispmtopgm magic yes
MacPaint macptopbm .macp ext yes
MGR Bitmap mgrtopbm .mgr match yes
Microdesign mdatopbm .mda match yes
MRF mrftopbm .mrf magic yes
MTV Ray Tracer mtvtoppm .mtv ext yes
Palm DB Image pdbimgtopam .pdb ext yes
QRT Ray Tracer qrttoppm .qrt .dis ext yes
SBIG CCD Camera sbigtopgm .sbig match yes
SBIG ST-4 CCD Camera st4topgm .st4 ext yes
Solitaire sirtopnm .sir magic yes
Sony Mavica 411 411toppm .411 ext yes
SPOT Satellite spottopgm .spot ext no
Sun Icon sunicontopnm .icon match yes
SVG svgtopam .svg ext yes
Usenix FaceSaver fstopgm .fs .face match yes
Utah RLE rletopnm .rle magic yes
Wireless Bitmap wbmptopbm .wbmp ext yes
X IMage ximtoppm .xim ext yes
X Window Dump xwdtopnm .xwd match yes
XV Thumbnail xvminitoppm magic yes
Xerox Doodle Brush brushtopbm .brush ext no
YBM Face File ybmtopbm .ybm magic yes

Known issues

  • FIASCO multi-frame sequences: FIASCO supports video (multiple frames in one file). The bridge currently only handles single-frame images because fiascotopnm can't output multi-frame sequences to stdout. Video files will fail to open.

Excluded formats

The following netpbm converters are not supported by this plugin:

Converter Format Reason
hpcdtoppm Kodak Photo CD Pillow handles PCD natively
cameratopam Camera RAW (NEF, CR2) Segfaults on NEF files, "File seek failed" on CR2
ddbugtopbm Diddle/DiddleBug sketch DB Reads stdin only, writes multiple .pbm files to CWD
pcdovtoppm Kodak Photo CD Overview Shell script pipeline, not a single-binary converter
bioradtopgm Bio-Rad Confocal Magic at byte offset 54, beyond Pillow's 16-byte prefix limit; no known extension
escp2topbm Epson ESC/P2 raster No fixed header magic, no known file extension
thinkjettopbm HP ThinkJet No fixed header magic, no known file extension
eyuvtoppm Encoder YUV Headerless format, dimensions not in file
yuvtoppm YUV 4:1:1 Headerless format, dimensions not in file
yuy2topam YUY2 Video Frame Headerless format, dimensions not in file
psidtopgm PostScript Image Data Requires manual width/height/bps args, not a standalone file format
imgtoppm Img-whatnot .img extension clashes with many formats; no test data, origin server defunct
pktopbm TeX PK Font Bitmap Writes multiple PBM files (one per glyph), not a single-image converter
rlatopam Wavefront RLA Broken on 64-bit: sizeof(long) misaligns header read, numChan never assigned
zeisstopnm Zeiss Confocal (LSM) TIFF-based format, Pillow handles it natively

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

pillow_netpbm-0.2.1.tar.gz (10.6 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

pillow_netpbm-0.2.1-py3-none-any.whl (11.2 kB view details)

Uploaded Python 3

File details

Details for the file pillow_netpbm-0.2.1.tar.gz.

File metadata

  • Download URL: pillow_netpbm-0.2.1.tar.gz
  • Upload date:
  • Size: 10.6 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.13.7

File hashes

Hashes for pillow_netpbm-0.2.1.tar.gz
Algorithm Hash digest
SHA256 2aba223c915283f551ab9e2c2d72649bbbad0db1852525b92d6c5f16f7b72743
MD5 b808921658cfa9d66dd05cf65ceaeaa5
BLAKE2b-256 8586a9e7c533e2ca1a6e9b57f2f3d860019f38b77bf1ed4224ef7fc39a2caf6e

See more details on using hashes here.

File details

Details for the file pillow_netpbm-0.2.1-py3-none-any.whl.

File metadata

  • Download URL: pillow_netpbm-0.2.1-py3-none-any.whl
  • Upload date:
  • Size: 11.2 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.13.7

File hashes

Hashes for pillow_netpbm-0.2.1-py3-none-any.whl
Algorithm Hash digest
SHA256 6e2e31c6899a22d4b697aa1f8cea584cd5493cce41076797770a4b0eba9428f2
MD5 568d928b04643e58bb04a1c7d739c0fb
BLAKE2b-256 ae168d8d1f3ce7890a7ff392c98bc4c0b9c589c126726212aa2150ca8c46e754

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page