Security News
tea.xyz Spam Plagues npm and RubyGems Package Registries
Tea.xyz, a crypto project aimed at rewarding open source contributions, is once again facing backlash due to an influx of spam packages flooding public package registries.
Readme
VisuMorph is a powerful, user-friendly Python package designed for image manipulation. It simplifies image processing tasks, allowing users to effortlessly apply transformations and adjustments to their images. With its intuitive interface and a wide range of functionalities, VisuMorph is ideal for both hobbyists and professionals looking to enhance their digital imagery.
The full documentation including installation guides, example usages, and API references is hosted on ReadTheDocs and can be found here:
https://visumorph.readthedocs.io/en/latest/
In alphabetical order:
Currently, the package is published on PyPI. If you're looking to use VisuMorph without diving into the development, you can easily install it using pip:
pip install visumorph
For those interested in contributing or exploring the development version, please follow these steps:
Clone the repository:
git clone https://github.com/UBC-MDS/VisuMorph.git
Navigate to the cloned directory and install the package in editable mode along with the development dependencies:
pip install -e .
VisuMorph includes a variety of functions for image manipulation:
flip
): Horizontally or vertically flip images, useful for creating mirror effects or correcting orientation.rotate
): Rotate images by a specified degree, supporting both clockwise and anticlockwise rotations.change_hue
): Adjust the hue of images, allowing for color shifting and mood setting in visuals.scale
): Resize images, either uniformly or non-uniformly, without losing the essence of the visual content.For a quick glimpse into what VisuMorph can do, here are a few simple examples:
Flip an image horizontally or vertically. This example flips an image horizontally.
import visumorph as vm
# Load your image
img = vm.load_image("path/to/image.jpg")
# Flip the image horizontally
flipped_img = vm.flip(img, v=0)
# Save the flipped image
flipped_img.save("path/to/flipped_image.jpg")
Rotate an image by a specified angle in degrees. This example rotates an image by 90 degrees.
import visumorph as vm
# Load your image
img = vm.load_image("path/to/image.jpg")
# Rotate the image by 90 degrees
rotated_img = vm.rotate(img, rotation=90)
# Save the rotated image
rotated_img.save("path/to/rotated_image.jpg")
Change the hue of an image. This example changes the hue by a delta value.
import visumorph as vm
# Load your image
img = vm.load_image("path/to/image.jpg")
# Change the hue of the image
hue_changed_img = vm.change_hue(img, delta_hue=0.3)
# Save the hue-changed image
hue_changed_img.save("path/to/hue_changed_image.jpg")
Scale an image by a specified factor. This example enlarges the image by 20%.
import visumorph as vm
# Load your image
img = vm.load_image("path/to/image.jpg")
# Scale the image by 1.2 times
scaled_img = vm.scale(img, scale=1.2)
# Save the scaled image
scaled_img.save("path/to/scaled_image.jpg")
Make sure to replace "path/to/image.jpg"
and the save paths with the actual paths to your image files and desired output locations.
To ensure VisuMorph works as expected, we've included a suite of tests. You can run these tests using pytest to verify the installation and functionality:
pytest --cov=visumorph
If a coverage report is desired, you can run the above command with an extra arugment:
pytest --cov=visumorph --cov-report=xml
VisuMorph, while a robust tool for image manipulation, is designed primarily as an educational project for the 524 course in the Master of Data Science program. It serves as an introductory tool for those beginning their journey in data science and image processing. While it offers a range of functionalities, it is more limited in scope compared to professional-grade packages like PIL (Python Imaging Library) and OpenCV. These larger libraries offer a wider range of complex functionalities and are suited for industrial applications. However, VisuMorph stands out for its simplicity and ease of use, making it an excellent starting point for students and hobbyists looking to understand the basics of image manipulation in Python.
For reference to more advanced libraries, you can visit:
Interested in contributing? Check out the contributing guidelines. Please note that this project is released with a Code of Conduct. By contributing to this project, you agree to abide by its terms.
visumorph
was created by Orix Au Yeung, Marco Bravo, Atabak Alishiri, Shawn Hu. It is licensed under the terms of the MIT license.
visumorph
was created with cookiecutter
and the py-pkgs-cookiecutter
template.
FAQs
Package for image manipulations in Python
We found that visumorph demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 1 open source maintainer 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
Tea.xyz, a crypto project aimed at rewarding open source contributions, is once again facing backlash due to an influx of spam packages flooding public package registries.
Security News
As cyber threats become more autonomous, AI-powered defenses are crucial for businesses to stay ahead of attackers who can exploit software vulnerabilities at scale.
Security News
UnitedHealth Group disclosed that the ransomware attack on Change Healthcare compromised protected health information for millions in the U.S., with estimated costs to the company expected to reach $1 billion.