[Mapit] WG: NT, IIS and png
Anja Kipfer
kipfer at logiball.de
Tue May 15 17:27:23 CEST 2001
Hi Bernhard,
here's the description of the problem installing Mapit on IIS 4.0. The SIG
"image-sig at python.org" is actually a good place to get some assistance for
PIL issues.
I had written "c:\Program Files\Python\python.exe -u %s %s" in the Registry
and thought this is okay but when I looked under HomeDirectory ->
Configuration the "u" was missing.
Everything just work fine now...
Regards, Anja
-----Ursprüngliche Nachricht-----
Von: Clover Andrew [SMTP:aclover at 1value.com]
Gesendet am: Donnerstag, 10. Mai 2001 18:37
An: image-sig at python.org
Betreff: Re: [Image-SIG] NT, IIS and png
Anja Kipfer <kipfer at logiball.de> wrote:
> Do I need a certain environment-variable or similar to be
> able to write in sys.stdout?
No, the problem is most likely that you're not writing to
stdout as a binary file. LFs are probably being changed into
CRLFs, making the file invalid.
Check your IIS Python-script-handler in 'Home directory->
Configuration' - if I remember correctly, you need the '-u'
switch to get a binary stdout, so the command should probably
be something like
X:\Program Files\Python\python.exe -u "%s" "%s"
Does that fix it?
-----Ursprüngliche Nachricht-----
Von: Anja Kipfer [SMTP:kipfer at logiball.de]
Gesendet am: Donnerstag, 10. Mai 2001 15:20
An: 'image-sig at python.org'
Betreff: NT, IIS and png
Hiya,
there's a problem with displaying png-data when the script runs in IIS 4.0
on NT. Using Apache on NT the same code /png-files just work fine!
The error occurs a follows:
Image.save is called: apply(image.save, (sys.stdout, format), params)
this calls PngImagePlugin._save(im, fp, filename, chunk=putchunk, check=0)
this calls ImageFile._save(...)
Here, the script crashes at line fh=fp.fileno(), whereby fp is the
passed-through parameter sys.stdout
If I call image.save with a filename instead, a correct png-file gets
created - but I have it in the file system and not on the screen where I
want it to be! Do I need a certain environment-variable or similar to be
able to write in sys.stdout? Does anyone have an idea of how to solve that
problem???
With many thanks in advance, Anja
More information about the Mapit
mailing list
This site is hosted by Intevation GmbH (Datenschutzerklärung und Impressum | Privacy Policy and Imprint)