Farama-Foundation / lycon2

A minimal and fast image library for Python and C++
Other
4 stars 1 forks source link

This project is no longer being mainted and we encourage users to use https://github.com/Farama-Foundation/tinyscaler instead

Lycon2

A maintained fork of lycon, a minimal and fast image library for Python and C++.

Tested on:

Install

pip install lycon2

Example

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)

License

See LICENSE for further details.