Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Pillow-simd as a C shared library #32

Open
up-to-you opened this issue May 6, 2018 · 3 comments
Open

Pillow-simd as a C shared library #32

up-to-you opened this issue May 6, 2018 · 3 comments

Comments

@up-to-you
Copy link

up-to-you commented May 6, 2018

What did you do?

I have read C source

What did you expect to happen?

Boom! And all over the world are happy!

What actually happened?

Boom failed.

Can you please provide some tools / instructions / documentation for extracting pillow-simd as a C shared library? I think it's a good goal to bring this blazing-fast image tool to JVM world.

@homm
Copy link

homm commented May 7, 2018

Pillow is a python-only library. There are no plans to support other languages. There was at least one attempt from @peterhj to port Pillow-SIMD to Rust:

https://github.com/peterhj/pillow_simd_ffi
https://github.com/peterhj/pillow-simd/commits/bootstrap-imaging

@peterhj
Copy link

peterhj commented May 7, 2018

Yes, to elaborate a bit further, only the "libImaging" component of Pillow/Pillow-SIMD is rather amenable to packaging as a C library. The "bootstrap-imaging" branch @homm pointed to removes some Python specific parts of libImaging so it can be separately compiled.

There is some functionality in libImaging that is more difficult to separate cleanly from Python, namely the encoder and decoder parts.

@capr
Copy link

capr commented Feb 2, 2022

Here's a build script and a small C wrapper just for the image object and resampling: https://github.com/allegory-software/allegory-sdk/tree/dev/c/pillow_simd. Looks like you can wrap it easily without having to touch the upstream code.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants