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

Mention numpy in the docs? #2593

Closed
cdeil opened this issue Jun 26, 2017 · 0 comments
Closed

Mention numpy in the docs? #2593

cdeil opened this issue Jun 26, 2017 · 0 comments

Comments

@cdeil
Copy link

cdeil commented Jun 26, 2017

I'm new to Pillow, and was trying to convert data from and to Numpy arrays.

Currently searching for numpy in the Pillow docs doesn't give a single result:
http://pillow.readthedocs.io/en/4.1.x/search.html?q=numpy&check_keywords=yes&area=default

With Google I found https://stackoverflow.com/a/384926/498873 which points to http://effbot.org/zone/pil-changes-116.htm which gives what I think is the way to do it now:

i = Image.open('lena.jpg')
a = numpy.asarray(i) # a is readonly
i = Image.fromarray(a)

Is it worth adding that info in a small section "converting to / from Numpy arrays" somewhere in the Pillow docs?

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

No branches or pull requests

3 participants