I'm trying to get scipy.misc.imread to just read in an image and tell me it size, which I've been able to do fine on other computers but it's failing for me on a new Mac:
Python 2.7.4 (default, May 16 2013, 16:40:58)
[GCC 4.2.1 Compatible Apple Clang 4.1 ((tags/Apple/clang-421.11.65))] on darwin
Type "help", "copyright", "credits" or "license" for more information.
>>> import scipy.misc
>>> scipy.__version__
'0.11.0'
>>> image = scipy.misc.imread('test.jpg')
>>> image
array(<PIL.JpegImagePlugin.JpegImageFile image mode=RGB size=870x1110 at 0x10BEC3F80>, dtype=object)
>>> image.size
1
>>> image.shape
()
So the image is loaded, and the size (870x1110) seems to be present, but when I do image.size or image.shape I get garbage.
I use the exact same code on the same image on another machine and get sensible results:
>>> image.size
237456
>>> image.shape
(318,249,3)
(And incidentally, when I print image on the good machine, it shows as an array of uint8 instead of an array of objects).
The bad machine is a Mac, running Mountain Lion, with python 2.7.4 and scipy version 0.11 (I downgraded from 0.12 in case that was the problem). I'm running in a virtual environment using venv.
Anyone know what's going on? Have I installed PIL badly, or something?