A maintained fork of lycon, a minimal and fast image library for Python and C++.
Tested on:
3.6
.pip install lycon2
import lycon2
# Load an image as a numpy array
img = lycon2.imread('mittens.jpg')
# Resize the image using bicubic interpolation
resized = lycon2.resize(img, (256, 512), interpolation=lycon2.Interpolation.CUBIC)
# Crop the image (like any regular numpy array)
cropped = resized[:100, :200]
# Save the image
lycon2.imwrite('cropped-mittens.png', cropped)
See LICENSE
for further details.