Package: imread
IO with images and numpy arrays.Mahotas-imread is a simple module with a small number of functions:imreadReads an image fileimread_multiReads an image file with multiple images. Currently, TIFF and STK (a TIFF
sub-based format) support this function.imsaveWrites an image fileExample (which usesmahotasfor
Gaussian filtering):from imread import imread, imsave
from mahotas import gaussian_filter
lena = imread('lena.jpeg')

lena = gaussian_filter(lena.astype(float), 4.)
imsave('lena-filtered.jpeg', lena)This grew out of frustration at current image loading solutions in Python, in
either my packages [mahotas] or packages from
others [scikit-image, for example].The relationship with numpy is very contained and this could be easily
repurposed to load images in other frameworks, even other programming
languages.Online documentationPython versions 2.6, 2.7, 3.3+ are officially supported.Python 3.2 (and earlier versions in the Python 3 series) are officiallynot
supported. Patches will be accepted if they do not mess up anything else, but
bug reports will not be considered as very high priority.CitationIf you use imread on a published publication, please cite the mainmahotaspaper (imread is a spin-off of mahotas):Luis Pedro CoelhoMahotas: Open source software for scriptable computer
vision in Journal of Open Research Software, vol 1, 2013. [DOI]In Bibtex format:@article{mahotas,
    author = {Luis Pedro Coelho},
    title = {Mahotas: Open source software for scriptable computer vision},
    journal = {Journal of Open Research Software},
    year = {2013},
    doi = {https://dx.doi.org/10.5334/jors.ac},
    month = {July},
    volume = {1}
}Installation/DependenciesThe easiest environment to install mahotas-imread is anaconda, throughconda-forge. Just use:conda config --add channels conda-forge
conda install imreadTo compile on debian/ubuntu:sudo apt-get install libpng12-dev libtiff4-dev libwebp-dev
sudo apt-get install xcftoolsTo compile on Mac:sudo port install libpng tiff webpEither way, you can then compile with:python setup.py buildand install with:python setup.py installOn Windows, you can also just download a pre-built package fromC. Gohlke’s
repositoryOn nix, you can use:nix-env -iA nixpkgs.python3Packages.imreador use thepkgs.python3Packages.imreadobject in your*.nixfiles.Links & ContactsDocumentation:https://imread.readthedocs.io/Issue Tracker:github imread issuesMailing List: Use thepythonvision mailing listfor questions, bug
submissions, etc.Main Author & Maintainer:Luis Pedro Coelho(follow ontwitterorgithub).HistoryVersion 0.7.5 (2023-11-22)Fix build issue (#43, patch by @carlosal1015)Version 0.7.4 (2020-04-14)Add missing header files to distributionVersion 0.7.3 (2020-04-09)Add missing test data to distributionVersion 0.7.2 (2020-03-24)Fix several memory access bugs in parsers (reported by Robert Scott)Version 0.7.1 (2019-05-09)Fix 16-bit RGB/RGBA TIFF write (patch by Tomi Aarnio)Version 0.7.0 (2018-09-30)Add support for reading ImageJ ROIsVersion 0.6.1 (2018-02-15)Support pathlib paths as function argumentsFix 16 bit PNG write support (patch by Tomi Aarnio)Version 0.6 (2016-09-21)Addsupports_formatfunctionMake png compression level tunable when calling imsaveAdd imsave_multiAdd partial support for reading PNG files in Gray+alpha formatVersion 0.5.1 (2014-11-06)Improve tests to work after installationFix compilation in MSVC (patch by Christoph Gohlke)Version 0.5 (2014-10-16)Add magic-number based format auto-detectionAuto detect whether webp is installedFix WebP reading (update to newer API)Version 0.4 (2014-07-21)Add configuration for TIFF savingCorrectly save 16 bit PNG imagesBetter error messages for JPEGVersion 0.3.2 (2013-10-06)Added imload*/imwrite synonyms as suggested by Thouis (Ray) JonesOptions frameworkAllow user to specify JPEG quality when savingFix loading of 16 bit PNG imagesVersion 0.3.1 (2013-06-20)Fix possible crash on error with TIFFFix compilation on Windows (reported by Volker Hilsenstein)Make it easy to compile without WebPVersion 0.3.0 (2013-07-29)Support for reading from in-memory blobsSupport for reading & writing TIFF metadataAdd PHOTOMETRIC tag to TIFF (reported by Volker Hilsenstein)Support writing RGB TIFFsVersion 0.2.6 (2013-06-19)Fix hard crash when saving with non-existing file typeFix compilation on MacOS (patch by Alexander Bohn)Addverboseargument to tests.run()Better error when attempting to save floating point imagesVersion 0.2.5 (2012-10-29)Correctly accept uppercase extensionsPython 3 support (patch by Christoph Gohlke [pull request 8 on github])Read 1-Bit PNGsRead simple BMPs (compression and many bit types not supported)More complete debug mode (export DEBUG=2 when building), more checksVersion 0.2.4 (2012-06-26)Add lzw.cpp to source distributionSupport saving 16-bit TIFFBetter Mac OS support (patch from Alexander Bohn)Version 0.2.3 (2012-06-8)Fix imread_multiVersion 0.2.2 (2012-06-5)Addformatstrargument to imreadOpen files in binary mode on Windows (patch by Christoph Gohlke)Read-only support for LSM filesRead-only support for XCF files (throughxcf2png)Fix writing of non-contiguous images (at least PNG was affected)Version 0.2.1 (2012-02-11)Add missing files to distributionVersion 0.2 (2012-03-19)Compile on MSVC++ (Patches by Christoph Gohlke)Support for WebPSupport for 1-bit TIFFsBetter error messageSupport for multi-page TIFF readingExperimental read-only support for STK filesVersion 0.1 (2012-02-28)Support for PNGSupport for TIFFSupport for JPEG