{"id":15009006,"url":"https://github.com/luispedro/imread","last_synced_at":"2025-10-08T18:24:35.044Z","repository":{"id":2364220,"uuid":"3328127","full_name":"luispedro/imread","owner":"luispedro","description":"Read images to numpy arrays","archived":false,"fork":false,"pushed_at":"2024-08-03T00:31:25.000Z","size":704,"stargazers_count":72,"open_issues_count":2,"forks_count":20,"subscribers_count":10,"default_branch":"master","last_synced_at":"2025-04-09T15:10:00.862Z","etag":null,"topics":["c-plus-plus","computer-vision","image-processing","python","python-2","python-3"],"latest_commit_sha":null,"homepage":"","language":"C++","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/luispedro.png","metadata":{"files":{"readme":"README.md","changelog":"ChangeLog","contributing":null,"funding":null,"license":"COPYING.MIT","code_of_conduct":null,"threat_model":null,"audit":null,"citation":"CITATION","codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":"AUTHORS","dei":null,"publiccode":null,"codemeta":null}},"created_at":"2012-02-01T19:23:51.000Z","updated_at":"2025-03-16T08:18:45.000Z","dependencies_parsed_at":"2024-10-30T05:24:36.148Z","dependency_job_id":null,"html_url":"https://github.com/luispedro/imread","commit_stats":{"total_commits":306,"total_committers":14,"mean_commits":"21.857142857142858","dds":0.07189542483660127,"last_synced_commit":"2cc829a84c3b9aa26c0b08b9912912ff5a07d161"},"previous_names":[],"tags_count":24,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/luispedro%2Fimread","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/luispedro%2Fimread/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/luispedro%2Fimread/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/luispedro%2Fimread/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/luispedro","download_url":"https://codeload.github.com/luispedro/imread/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248055282,"owners_count":21040157,"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":["c-plus-plus","computer-vision","image-processing","python","python-2","python-3"],"created_at":"2024-09-24T19:22:21.157Z","updated_at":"2025-10-08T18:24:30.009Z","avatar_url":"https://github.com/luispedro.png","language":"C++","funding_links":[],"categories":["Geospatial Library","Python"],"sub_categories":["Python"],"readme":"# mahotas-imread: Read Image Files\n\n[![License](https://anaconda.org/conda-forge/imread/badges/license.svg)](https://opensource.org/licenses/MIT)\n[![Install with conda](https://img.shields.io/badge/install%20with-conda-brightgreen.svg?style=flat)](https://anaconda.org/conda-forge/imread)\n[![image](https://anaconda.org/conda-forge/imread/badges/downloads.svg)](https://anaconda.org/conda-forge/imread)\n[![Test mahotas-imread](https://github.com/luispedro/imread/actions/workflows/test-python-package-with-conda.yml/badge.svg)](https://github.com/luispedro/imread/actions/workflows/test-python-package-with-conda.yml)\n\nIO with images and numpy arrays.\n\nMahotas-imread is a simple module with a small number of functions:\n\n- `imread`:   Reads an image file\n- `imread_multi`:   Reads an image file with multiple images. Currently, TIFF and STK (a TIFF sub-based format) support this function.\n- `imsave`:   Writes an image file\n\nExample (which uses [mahotas](https://luispedro.org/software/mahotas)\nfor Gaussian filtering):\n\n\n```python\nfrom imread import imread, imsave\nfrom mahotas import gaussian_filter\nlena = imread('lena.jpeg')\n\nlena = gaussian_filter(lena.astype(float), 4.)\nimsave('lena-filtered.jpeg', lena)\n```\n\nThis grew out of frustration at current image loading solutions in\nPython, in either my packages \\[[mahotas](https://mahotas.rtfd.io)\\] or\npackages from others \\[[scikit-image](https://scikit-image.org/), for\nexample\\].\n\nThe relationship with numpy is very contained and this could be easily\nrepurposed to load images in other frameworks, even other programming\nlanguages.\n\n[Online documentation](https://imread.rtfd.io/)\n\nPython versions 2.6, 2.7, 3.3+ are officially supported.\n\n## Citation\n\n::: {#Citation}\nIf you use imread on a published publication, please cite the main\n[mahotas](https://mahotas.rtfd.io) paper (imread is a spin-off of\nmahotas):\n:::\n\n\u003e **Luis Pedro Coelho** Mahotas: Open source software for scriptable\n\u003e computer vision in Journal of Open Research Software, vol 1, 2013.\n\u003e \\[[DOI](https://dx.doi.org/10.5334/jors.ac)\\]\n\nIn Bibtex format:\n\n```\n@article{mahotas,\n    author = {Luis Pedro Coelho},\n    title = {Mahotas: Open source software for scriptable computer vision},\n    journal = {Journal of Open Research Software},\n    year = {2013},\n    doi = {https://dx.doi.org/10.5334/jors.ac},\n    month = {July},\n    volume = {1}\n}\n```\n\n### Installation/Dependencies\n\nThe easiest environment to install mahotas-imread is anaconda, through\n[conda-forge](https://conda-forge.github.io). Just use:\n\n\n```bash\nconda config --add channels conda-forge\nconda install imread\n```\n\nTo compile on debian/ubuntu:\n\n```bash\nsudo apt-get install libpng12-dev libtiff4-dev libwebp-dev\nsudo apt-get install xcftools\n```\n\nTo compile on Mac:\n\n```bash\nsudo port install libpng tiff webp\n```\n\nEither way, you can then compile with:\n\n```bash\npython setup.py build\n```\n\nand install with:\n\n```bash\npython setup.py install\n```\n\nOn Windows, you can also just download a pre-built package from [C.\nGohlke\\'s\nrepository](https://www.lfd.uci.edu/~gohlke/pythonlibs/#imread)\n\nOn nix, you can use:\n\n```\nnix-env -iA nixpkgs.python3Packages.imread\n```\n\nor use the `pkgs.python3Packages.imread` object in your `*.nix` files.\n\n## Links \u0026 Contacts\n\n- *Documentation*: https://imread.readthedocs.io/\n- *Issue Tracker*: [github imread issues](https://github.com/luispedro/imread)\n- *Mailing List*: Use the [pythonvision mailing list](https://groups.google.com/group/pythonvision?pli=1) for questions, bug submissions, etc.\n- *Main Author \u0026 Maintainer*: [Luis Pedro Coelho](https://luispedro.org) (follow on [twitter](https://twitter.com/luispedrocoelho) or [github](https://github.com/luispedro)).\n\n### History\n\n## Version 0.7.5 (2023-11-22)\n\n-   Fix build issue (#43, patch by \\@carlosal1015)\n\n## Version 0.7.4 (2020-04-14)\n\n-   Add missing header files to distribution\n\n## Version 0.7.3 (2020-04-09)\n\n-   Add missing test data to distribution\n\n## Version 0.7.2 (2020-03-24)\n\n-   Fix several memory access bugs in parsers (reported by Robert Scott)\n\n## Version 0.7.1 (2019-05-09)\n\n-   Fix 16-bit RGB/RGBA TIFF write (patch by Tomi Aarnio)\n\n## Version 0.7.0 (2018-09-30)\n\n-   Add support for reading ImageJ ROIs\n\n## Version 0.6.1 (2018-02-15)\n\n-   Support pathlib paths as function arguments\n-   Fix 16 bit PNG write support (patch by Tomi Aarnio)\n\n## Version 0.6 (2016-09-21)\n\n-   Add [supports_format]{.title-ref} function\n-   Make png compression level tunable when calling imsave\n-   Add imsave_multi\n-   Add partial support for reading PNG files in Gray+alpha format\n\n## Version 0.5.1 (2014-11-06)\n\n-   Improve tests to work after installation\n-   Fix compilation in MSVC (patch by Christoph Gohlke)\n\n## Version 0.5 (2014-10-16)\n\n-   Add magic-number based format auto-detection\n-   Auto detect whether webp is installed\n-   Fix WebP reading (update to newer API)\n\n## Version 0.4 (2014-07-21)\n\n-   Add configuration for TIFF saving\n-   Correctly save 16 bit PNG images\n-   Better error messages for JPEG\n\n## Version 0.3.2 (2013-10-06)\n\n-   Added imload\\*/imwrite synonyms as suggested by Thouis (Ray) Jones\n-   Options framework\n-   Allow user to specify JPEG quality when saving\n-   Fix loading of 16 bit PNG images\n\n## Version 0.3.1 (2013-06-20)\n\n-   Fix possible crash on error with TIFF\n-   Fix compilation on Windows (reported by Volker Hilsenstein)\n-   Make it easy to compile without WebP\n\n## Version 0.3.0 (2013-07-29)\n\n-   Support for reading from in-memory blobs\n-   Support for reading \u0026 writing TIFF metadata\n-   Add PHOTOMETRIC tag to TIFF (reported by Volker Hilsenstein)\n-   Support writing RGB TIFFs\n\n## Version 0.2.6 (2013-06-19)\n\n-   Fix hard crash when saving with non-existing file type\n-   Fix compilation on MacOS (patch by Alexander Bohn)\n-   Add `verbose` argument to tests.run()\n-   Better error when attempting to save floating point images\n\n## Version 0.2.5 (2012-10-29)\n\n-   Correctly accept uppercase extensions\n-   Python 3 support (patch by Christoph Gohlke \\[pull request 8 on\n    github\\])\n-   Read 1-Bit PNGs\n-   Read simple BMPs (compression and many bit types not supported)\n-   More complete debug mode (export DEBUG=2 when building), more checks\n\n## Version 0.2.4 (2012-06-26)\n\n-   Add lzw.cpp to source distribution\n-   Support saving 16-bit TIFF\n-   Better Mac OS support (patch from Alexander Bohn)\n\n## Version 0.2.3 (2012-06-8)\n\n-   Fix imread_multi\n\n## Version 0.2.2 (2012-06-5)\n\n-   Add [formatstr]{.title-ref} argument to imread\n-   Open files in binary mode on Windows (patch by Christoph Gohlke)\n-   Read-only support for LSM files\n-   Read-only support for XCF files (through [xcf2png]{.title-ref})\n-   Fix writing of non-contiguous images (at least PNG was affected)\n\n## Version 0.2.1 (2012-02-11)\n\n-   Add missing files to distribution\n\n## Version 0.2 (2012-03-19)\n\n-   Compile on MSVC++ (Patches by Christoph Gohlke)\n-   Support for WebP\n-   Support for 1-bit TIFFs\n-   Better error message\n-   Support for multi-page TIFF reading\n-   Experimental read-only support for STK files\n\n## Version 0.1 (2012-02-28)\n\n-   Support for PNG\n-   Support for TIFF\n-   Support for JPEG\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fluispedro%2Fimread","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fluispedro%2Fimread","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fluispedro%2Fimread/lists"}