It seems this library has fallen behind in maintenance... I don't have the Python chops to get it up to date (ValueError: numpy.dtype size changed, may indicate binary incompatibility. Expected 96 from C header, got 88 from PyObject 🤷♂️) but I was able to get it to just run in a modern Docker container using uv. uv creates virtual environments with older Python versions on the fly.
So in case anyone just has some rasters they need to adjust color for in 2024 without forking or patching:
# install uv
curl -L https://astral.sh/uv/install.sh | sh
# run your command
uvx -p 3.8 --from rasterio --with rio-color rio color -j8 in.tif out.tif "gamma 1 1.3"
It seems this library has fallen behind in maintenance... I don't have the Python chops to get it up to date (
ValueError: numpy.dtype size changed, may indicate binary incompatibility. Expected 96 from C header, got 88 from PyObject
🤷♂️) but I was able to get it to just run in a modern Docker container using uv. uv creates virtual environments with older Python versions on the fly.So in case anyone just has some rasters they need to adjust color for in 2024 without forking or patching: