I installed PIL 1.1.7 (which has been out for a while) into my Sage.

Still broken:

  Image.fromarray(scipy.lena()).show()

I think PIL just can't imagine a grayscale int32 image.  When I do
this instead

  Image.fromarray(numpy.asarray(scipy.lena(),
dtype=numpy.uint8)).show()

it works.

On Nov 12, 2:58 pm, Bill Janssen <[email protected]> wrote:
> I'm still trying to sort out the image processing capabilities of
> Sage.  One of the things my download of 4.7 has is PIL 1.1.6, which
> seems to have a broken Image.fromarray method.  For instance,
>
> Image.fromarray(scipy.lena()).show()
>
> gives a very odd-looking cubist interpretation of lena, indeed.
>
> Since the fromarray method was added specifically to support numpy use
> of PIL, it seems like a pretty critical bug.  For numpy and Sage, that
> is, not PIL.
>
> This method appears to be substantially re-written in PIL 1.1.7 --
> might even work there.  Anyone know?

-- 
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to 
[email protected]
For more options, visit this group at 
http://groups.google.com/group/sage-support
URL: http://www.sagemath.org

Reply via email to