{"id":19671239,"url":"https://github.com/cgohlke/netpbmfile","last_synced_at":"2025-07-21T08:03:35.358Z","repository":{"id":60722541,"uuid":"242422705","full_name":"cgohlke/netpbmfile","owner":"cgohlke","description":"Read and write Netpbm files.","archived":false,"fork":false,"pushed_at":"2025-05-09T04:47:15.000Z","size":197,"stargazers_count":7,"open_issues_count":0,"forks_count":0,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-07-10T15:27:12.255Z","etag":null,"topics":["format-reader","image","netpbm","python"],"latest_commit_sha":null,"homepage":"https://pypi.org/project/netpbmfile","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"bsd-3-clause","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/cgohlke.png","metadata":{"files":{"readme":"README.rst","changelog":"CHANGES.rst","contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null}},"created_at":"2020-02-22T22:47:58.000Z","updated_at":"2025-05-09T04:47:19.000Z","dependencies_parsed_at":"2024-11-11T17:08:17.535Z","dependency_job_id":"30c5532a-f8ce-4846-9551-af5661d01ca5","html_url":"https://github.com/cgohlke/netpbmfile","commit_stats":{"total_commits":66,"total_committers":2,"mean_commits":33.0,"dds":0.4696969696969697,"last_synced_commit":"f8dce4f8c9dda0a2b12a4a235e0c1397285b824a"},"previous_names":[],"tags_count":17,"template":false,"template_full_name":null,"purl":"pkg:github/cgohlke/netpbmfile","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/cgohlke%2Fnetpbmfile","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/cgohlke%2Fnetpbmfile/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/cgohlke%2Fnetpbmfile/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/cgohlke%2Fnetpbmfile/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/cgohlke","download_url":"https://codeload.github.com/cgohlke/netpbmfile/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/cgohlke%2Fnetpbmfile/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":266263057,"owners_count":23901356,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["format-reader","image","netpbm","python"],"created_at":"2024-11-11T17:08:14.460Z","updated_at":"2025-07-21T08:03:35.346Z","avatar_url":"https://github.com/cgohlke.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"..\n  This file is generated by setup.py\n\nRead and write Netpbm files\n===========================\n\nNetpbmfile is a Python library to read and write image files in the Netpbm\nor related formats:\n\n- PBM (Portable Bit Map): P1 (text) and P4 (binary)\n- PGM (Portable Gray Map): P2 (text) and P5 (binary)\n- PPM (Portable Pixel Map): P3 (text) and P6 (binary)\n- PNM (Portable Any Map): shorthand for PBM, PGM, and PPM collectively\n- PAM (Portable Arbitrary Map): P7, bilevel, gray, and rgb\n- PGX (Portable Graymap Signed): PG, signed grayscale\n- PFM (Portable Float Map): Pf (gray), PF (rgb), and PF4 (rgba), read-only\n- XV thumbnail: P7 332 (rgb332), read-only\n\nThe Netpbm formats are specified at https://netpbm.sourceforge.net/doc/.\n\nThe PGX format is specified in ITU-T Rec. T.803.\n\nNo gamma correction or scaling is performed.\n\n:Author: `Christoph Gohlke \u003chttps://www.cgohlke.com\u003e`_\n:License: BSD-3-Clause\n:Version: 2025.5.8\n\nQuickstart\n----------\n\nInstall the netpbmfile package and all dependencies from the\n`Python Package Index \u003chttps://pypi.org/project/netpbmfile/\u003e`_::\n\n    python -m pip install -U \"netpbmfile[all]\"\n\nSee `Examples`_ for using the programming interface.\n\nSource code and support are available on\n`GitHub \u003chttps://github.com/cgohlke/netpbmfile\u003e`_.\n\nRequirements\n------------\nThis revision was tested with the following requirements and dependencies\n(other versions may work):\n\n- `CPython \u003chttps://www.python.org\u003e`_ 3.10.11, 3.11.9, 3.12.9, 3.13.2 64-bit\n- `NumPy \u003chttps://pypi.org/project/numpy/\u003e`_ 2.2.5\n\nRevisions\n---------\n\n2025.5.8\n\n- Remove doctest command line option.\n\n2025.1.1\n\n- Improve type hints.\n- Drop support for Python 3.9, support Python 3.13.\n\n2024.5.24\n\n- Fix docstring examples not correctly rendered on GitHub.\n\n2024.4.24\n\n- Support NumPy 2.\n\n2023.8.30\n\n- Fix linting issues.\n- Add py.typed marker.\n\n2023.6.15\n\n- Drop support for Python 3.8 and numpy \u003c 1.21 (NEP29).\n- Improve type hints.\n\n2023.1.1\n\n- Several breaking changes:\n- Rename magicnum to magicnumber (breaking).\n- Rename tupltypes to tupltype (breaking).\n- Change magicnumber and header properties to str (breaking).\n- Replace pam parameter with magicnumber (breaking).\n- Move byteorder parameter from NetpbmFile.asarray to NetpbmFile (breaking).\n- Fix shape and axes properties for multi-image files.\n- Add maxval and tupltype parameters to NetpbmFile.fromdata and imwrite.\n- Add option to write comment to PNM and PAM files.\n- Support writing PGX and text formats.\n- Add Google style docstrings.\n- Add unittests.\n\n2022.10.25\n\n- …\n\nRefer to the CHANGES file for older revisions.\n\nExamples\n--------\n\nWrite a numpy array to a Netpbm file in grayscale binary format:\n\n.. code-block:: python\n\n    \u003e\u003e\u003e import numpy\n    \u003e\u003e\u003e data = numpy.array([[0, 1], [65534, 65535]], dtype=numpy.uint16)\n    \u003e\u003e\u003e imwrite('_tmp.pgm', data)\n\nRead the image data from a Netpbm file as numpy array:\n\n.. code-block:: python\n\n    \u003e\u003e\u003e image = imread('_tmp.pgm')\n    \u003e\u003e\u003e numpy.testing.assert_equal(image, data)\n\nAccess meta and image data in a Netpbm file:\n\n.. code-block:: python\n\n    \u003e\u003e\u003e with NetpbmFile('_tmp.pgm') as pgm:\n    ...     pgm.magicnumber\n    ...     pgm.axes\n    ...     pgm.shape\n    ...     pgm.dtype\n    ...     pgm.maxval\n    ...     pgm.asarray().tolist()\n    ...\n    'P5'\n    'YX'\n    (2, 2)\n    dtype('\u003eu2')\n    65535\n    [[0, 1], [65534, 65535]]\n\nView the image and metadata in the Netpbm file from the command line::\n\n    $ python -m netpbmfile _tmp.pgm","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcgohlke%2Fnetpbmfile","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fcgohlke%2Fnetpbmfile","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcgohlke%2Fnetpbmfile/lists"}