etemesi254 / zune-image

A fast and memory efficient image library in Rust
Other
319 stars 29 forks source link

feat(python): `resize()` #234

Closed kiyoon closed 1 week ago

kiyoon commented 1 week ago

resolves #232

Quickly tested that it compiles with maturin develop --release and the following code runs:

import zil

im_rust = zil.Image.open("r6.jpg")
im_rust.resize(500, 500, zil.ResizeMethod.Bilinear, in_place=True)
im_rust.save("a.png", format=zil.ImageFormat.PNG)
im_np = im_rust.to_numpy()
print(im_rust.dimensions())
print(im_np.shape)