The 1st code snippet of image_demo2.py is as follows
#!/usr/bin/env python
from pylab import *
w, h = 512, 512
s = file('../data/ct.raw', 'rb').read()
A = fromstring(s, uint16).astype(float)
A *= 1.0/max(A)
A.shape = w, h
I replaced s = file('../data/ct.raw', 'rb').read() with s =
The example assumes that the file is a dump of uin16 512x512 array.
So, no doubt that it won't work with a png file.
See
http://matplotlib.sourceforge.net/users/image_tutorial.html
-JJ
On Tue, Mar 23, 2010 at 9:41 AM, yogesh karpate yogeshkarp...@gmail.com wrote:
The 1st code snippet of