¡@

Home 

python Programming Glossary: pbm

How to write PIL image filter for plain pgm format?

http://stackoverflow.com/questions/4270700/how-to-write-pil-image-filter-for-plain-pgm-format

to PIL.Image.open . Here's some code that I use to get a PBM image into a numpy array. import re import numpy def pbm2numpy.. import re import numpy def pbm2numpy filename Read a PBM into a numpy array. Only supports ASCII PBM for now. fin None.. Read a PBM into a numpy array. Only supports ASCII PBM for now. fin None debug True try fin open filename 'r' while..