Yes I've try with and without r"XXX" syntax, with absolute, and relative
path, etc...
I've forgotten to tell you I'm using ActiveState Python 2.5.1.1
--
Erwan
Rob Cole wrote:
I have little clue, except: I've had problems using that r"asdf" syntax. Did
you try omitting the 'r' and doubling up on the backslashes?
PS - I've been programming in Python now for a total of about a week - so
take with salt...
Rob
-----Original Message-----
From: image-sig-bounces+sec=robcole....@python.org
[mailto:image-sig-bounces+sec=robcole....@python.org] On Behalf Of Erwan
Loaëc
Sent: Thursday, March 17, 2011 3:50 AM
To: image-sig@python.org
Subject: [Image-SIG] PIL 1.1.7, windows compilation: problem to save image
file
Hello,
I've successfully compiled PIL under windows XP 32 bits.
When I try to save a JPEG or TIFF file, I obtain the following trace:
Traceback (most recent call last):
File "D:\testpy\testPIL.py", line 9, in <module>
im.save(r"D:\testpy\mytest.jpg")
File "C:\Python25\lib\site-packages\PIL\Image.py", line 1439, in save
save_handler(self, fp, filename)
File "C:\Python25\lib\site-packages\PIL\JpegImagePlugin.py", line
471, in _s
ave
ImageFile._save(im, fp, [("jpeg", (0,0)+im.size, 0, rawmode)])
File "C:\Python25\lib\site-packages\PIL\ImageFile.py", line 499, in
_save
s = e.encode_to_file(fh, bufsize)
IOError: [Errno 0] Error
The problem is the "write(fh, buf, status)" in encode.c which always
return "-1". When I create a new handle directly in encode.c
example:
fh = open( "mytest.jpg", _O_WRONLY | _O_CREAT | _O_BINARY );
The write() works perfectly. So I think the problem should be related to
the file descriptor...
So, is anyone know the solution for windows ?
Note: under linux, everything works perfectly. It really seems to be a
"windows" issue.
Thanks,
_______________________________________________
Image-SIG maillist - Image-SIG@python.org
http://mail.python.org/mailman/listinfo/image-sig