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 ext 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 ext yes
SVG svgtopam .svg ext yes
Usenix FaceSaver fstopgm .fs ext 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.0.tar.gz (10.4 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.0-py3-none-any.whl (11.1 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: pillow_netpbm-0.2.0.tar.gz
  • Upload date:
  • Size: 10.4 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.0.tar.gz
Algorithm Hash digest
SHA256 c875571794cc7b0f347a15f5b3b8a8be7ba9be1b747ea96003539d0891d823a3
MD5 22a7e95b7b3bbe04b9a886c715a731bb
BLAKE2b-256 d4b3d92c647efcff3e1c8ff27a98e95a4a8c8d87d093c891b6f3751af86de394

See more details on using hashes here.

File details

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

File metadata

  • Download URL: pillow_netpbm-0.2.0-py3-none-any.whl
  • Upload date:
  • Size: 11.1 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.0-py3-none-any.whl
Algorithm Hash digest
SHA256 a6929ff6227ab4c678e8156d1ab6cb61d0131281192cacc5e6f7d0811e549149
MD5 cb38a11818ad3cc772f2ef73ce600a4a
BLAKE2b-256 310d4cf0443d3fde407f7ea72bfa3bf2b232749e17e7ea653625a22c0a2f087e

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