pip install imgrs
Thatβs it! We provide pre-built wheels for all major platforms.
# Latest stable version
pip install imgrs
# Specific version
pip install imgrs==0.1.0
# Upgrade to latest
pip install --upgrade imgrs
Only needed if your platform doesnβt have pre-built wheels.
Requirements:
Steps:
# Clone repository
git clone https://github.com/GrandpaEJ/imgrs.git
cd imgrs
# Install Rust if needed
curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh
# Install maturin
pip install maturin
# Build and install
maturin develop --release
# Or build wheel
maturin build --release
pip install target/wheels/imgrs-*.whl
For contributing to imgrs:
# Clone repository
git clone https://github.com/GrandpaEJ/imgrs.git
cd imgrs
# Install in editable mode
pip install -e .
# Install development dependencies
pip install -r requirements.txt
pip install pytest black flake8 isort
pip install imgrs numpy
Enables Image.fromarray() functionality:
import numpy as np
from imgrs import Image
array = np.random.randint(0, 255, (480, 640, 3), dtype=np.uint8)
img = Image.fromarray(array)
pip install pytest pytest-cov black flake8 isort mypy
import imgrs
print(imgrs.__version__)
# Output: 0.1.0
from imgrs import Image
# Create test image
img = Image.new("RGB", (100, 100), color=(255, 0, 0))
print(f"Size: {img.size}")
print(f"Mode: {img.mode}")
# Test operation
resized = img.resize((50, 50))
print(f"Resized: {resized.size}")
print("β
imgrs is working!")
# Make sure pip installed successfully
pip list | grep imgrs
# Reinstall
pip uninstall imgrs
pip install imgrs
# Check if wheel was installed
pip show imgrs
# If building from source, ensure Rust is installed
rustc --version
# Rebuild
pip install --force-reinstall imgrs
If no pre-built wheel for your platform:
# Install Rust first
curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh
# Then install imgrs (will build from source)
pip install imgrs
# Install NumPy
pip install numpy
# Or install both together
pip install imgrs numpy
pip uninstall imgrs
Having issues? Report a bug