Your image rotates due to inconsistencies in the origin of bewteen Image and pylab . If you use this fragment, the image will not be flipped in the reverse order.
import pylab as pl import Image im = Image.open('test.jpg').convert('L') pl.imshow(im, origin='lower') pl.show()
However, the image will not be displayed in black and white. To do this, you need to specify a color code for shades of gray:
import pylab as pl import Image import matplotlib.cm as cm im = Image.open('test.jpg').convert('L') pl.imshow(im, origin='lower', cmap=cm.Greys_r) pl.show()
Et voilà!
source share