5

I have an image in NumPy array format and I want save it to my disk. I used this code:

from PIL import Image
....
Image.fromarray(img).save('res.png')

But it saved as 8-bit. How can I make it save as 16-bit?

0

1 Answer 1

5

I believe the answer at https://stackoverflow.com/a/25814423/727533 may be what you're looking for. It describes using PyPNG to output a NumPy array as a PNG.

Sign up to request clarification or add additional context in comments.

Comments

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.