imgrs

πŸ’Ώ Installation Guide

Quick Install

pip install imgrs

That’s it! We provide pre-built wheels for all major platforms.

Supported Platforms

βœ… Linux (manylinux)

βœ… Windows

βœ… macOS

βœ… Android

Python Version Support

Installation Methods

# Latest stable version
pip install imgrs

# Specific version
pip install imgrs==0.1.0

# Upgrade to latest
pip install --upgrade imgrs

From Source

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

Development Install

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

Optional Dependencies

NumPy Support

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)

Development Tools

pip install pytest pytest-cov black flake8 isort mypy

Verification

Check Installation

import imgrs
print(imgrs.__version__)
# Output: 0.1.0

Run Quick Test

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!")

Troubleshooting

ImportError: No module named β€˜imgrs’

# Make sure pip installed successfully
pip list | grep imgrs

# Reinstall
pip uninstall imgrs
pip install imgrs

ImportError: Rust extension not available

# Check if wheel was installed
pip show imgrs

# If building from source, ensure Rust is installed
rustc --version

# Rebuild
pip install --force-reinstall imgrs

Platform not supported

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

NumPy errors

# Install NumPy
pip install numpy

# Or install both together
pip install imgrs numpy

Uninstallation

pip uninstall imgrs

Next Steps


Having issues? Report a bug