Security News
Research
Data Theft Repackaged: A Case Study in Malicious Wrapper Packages on npm
The Socket Research Team breaks down a malicious wrapper package that uses obfuscation to harvest credentials and exfiltrate sensitive data.
IO with images and numpy arrays.
Mahotas-imread is a simple module with a small number of functions:
imread
: Reads an image fileimread_multi
: Reads an image file with multiple images. Currently, TIFF and STK (a TIFF sub-based format) support this function.imsave
: Writes an image fileExample (which uses mahotas for 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.
Python versions 2.6, 2.7, 3.3+ are officially supported.
::: {#Citation} If you use imread on a published publication, please cite the main mahotas paper (imread is a spin-off of mahotas): :::
Luis Pedro Coelho Mahotas: 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}
}
The easiest environment to install mahotas-imread is anaconda, through conda-forge. Just use:
conda config --add channels conda-forge
conda install imread
To compile on debian/ubuntu:
sudo apt-get install libpng12-dev libtiff4-dev libwebp-dev
sudo apt-get install xcftools
To compile on Mac:
sudo port install libpng tiff webp
Either way, you can then compile with:
python setup.py build
and install with:
python setup.py install
On Windows, you can also just download a pre-built package from C. Gohlke's repository
On nix, you can use:
nix-env -iA nixpkgs.python3Packages.imread
or use the pkgs.python3Packages.imread
object in your *.nix
files.
verbose
argument to tests.run()FAQs
imread: Image reading library
We found that imread demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 2 open source maintainers collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Security News
Research
The Socket Research Team breaks down a malicious wrapper package that uses obfuscation to harvest credentials and exfiltrate sensitive data.
Research
Security News
Attackers used a malicious npm package typosquatting a popular ESLint plugin to steal sensitive data, execute commands, and exploit developer systems.
Security News
The Ultralytics' PyPI Package was compromised four times in one weekend through GitHub Actions cache poisoning and failure to rotate previously compromised API tokens.