Skip to main content

Read and write Netpbm files

Project description

Netpbmfile is a Python library to read and write files in the Netpbm format as specified at http://netpbm.sourceforge.net/doc/.

The following Netpbm formats are supported: PBM (bi-level), PGM (grayscale), PPM (color), PAM (arbitrary), XV thumbnail (RGB332, read-only). Also reads Portable FloatMap formats: PF (float32 RGB) and Pf (float32 grayscale).

No gamma correction is performed. Only one image per file is supported.

Author:

Christoph Gohlke

Organization:

Laboratory for Fluorescence Dynamics, University of California, Irvine

Version:

2018.10.18

Requirements

Revisions

2018.10.18

Move netpbmfile.py into netpbmfile package.

2018.02.18

Support Portable FloatMaps. Style fixes.

2016.02.24

Use ‘fromdata’ classmethod to initialize from data. Support ‘with’ statement. Scale RGB images to maxval for display. Make keyword arguments explicit. Support numpy 1.10.

Examples

>>> im1 = numpy.array([[0, 1], [65534, 65535]], dtype='uint16')
>>> imsave('_tmp.pgm', im1)
>>> im2 = imread('_tmp.pgm')
>>> assert numpy.all(im1 == im2)

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

netpbmfile-2018.10.18.tar.gz (6.6 kB view details)

Uploaded Source

Built Distribution

netpbmfile-2018.10.18-py2.py3-none-any.whl (8.2 kB view details)

Uploaded Python 2 Python 3

File details

Details for the file netpbmfile-2018.10.18.tar.gz.

File metadata

  • Download URL: netpbmfile-2018.10.18.tar.gz
  • Upload date:
  • Size: 6.6 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/1.12.1 pkginfo/1.4.2 requests/2.20.0 setuptools/40.4.3 requests-toolbelt/0.8.0 tqdm/4.27.0 CPython/3.6.6

File hashes

Hashes for netpbmfile-2018.10.18.tar.gz
Algorithm Hash digest
SHA256 fac5e22699aa7d0c9ef3309599a12be8e205b642cd45b1b74dc934d475023228
MD5 95c0fc1de8b9ed799e9a6ce261ecf277
BLAKE2b-256 0125f98d9511ef9dc4605b415c4a07aa7b079e5deb3625fb1bbbe3f5897cdb02

See more details on using hashes here.

File details

Details for the file netpbmfile-2018.10.18-py2.py3-none-any.whl.

File metadata

  • Download URL: netpbmfile-2018.10.18-py2.py3-none-any.whl
  • Upload date:
  • Size: 8.2 kB
  • Tags: Python 2, Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/1.12.1 pkginfo/1.4.2 requests/2.20.0 setuptools/40.4.3 requests-toolbelt/0.8.0 tqdm/4.27.0 CPython/3.6.6

File hashes

Hashes for netpbmfile-2018.10.18-py2.py3-none-any.whl
Algorithm Hash digest
SHA256 3d5f981d1ff95ede34b2b284848ac1b0413ebd13cd4b202ef344fdd19931ea71
MD5 181f4565c3b61899ec6594bd47fba0c7
BLAKE2b-256 84415d2db7faf0e7cc74b846876242cd43e77b0600d1323b6ac9383fc42aa0e7

See more details on using hashes here.

Supported by

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