Python and the PIL...

Anders Eriksson ame at swipnet.se
Thu Jun 15 12:43:42 EDT 2000


On Thu, 15 Jun 2000 13:48:08 +0100, "Tobe" <tbradshaw at orchestream.com>
wrote:

>I have some code that relies on the Python Imaging Library which I'm trying
>to use on my NT box but I'm finding a few probs.. namely Image.thumbnail(())
>produces garbage..
>
It has probably with the binary/text mode thing that NT has. If you
don't say anything then you have a text file and then all <lf>
magically will change to <cr><lf>

So you need to remind Python that you're working with binary files.

f = open("binfile.jpg","wb")

if-your-using-StringIO-then-I-don't-know-ly y'rs

// Anders




More information about the Python-list mailing list