[Mapit] PIL will not make map, BUG BUG!! Please make correction.
Bernhard Herzog
bh at intevation.de
Thu Oct 27 17:20:54 CEST 2005
Cave Crickett <crickett at gmail.com> writes:
> line 78 reads:
> image = PIL.Image.new("RGB", (result_width, result_height), 0xFFFFFFFF)
>
> should read:
> image = PIL.Image.new("RGB", (result_width, result_height), 0xFFFFFF)
> There are too many F's. This causes the PIL not to gen the map!
Thanks for pointing this out!
Which Python version do you use? What's the exact error message you
get? I suspect it's Python 2.4. In 2.4 the interpretation of
hexadecimal literals changed. Formerly, on a 32 bit system, 0xFFFFFFFF
was -1, now it's 4294967295L. With Python 2.4 I get the error
return Image()._new(core.fill(mode, size, color))
SystemError: new style getargs format but argument is not a tuple
With older Python's the code that's in MapIt works just fine. Of
course, since it doesn't work anymore with 2.4, we'll have to fix it.
Fixing it is easy enough. The change you propose also works with older
Python+PIL versions including Python 1.5.2 and PIL 1.1.3.
I don't know when I'll have time to actually make a release, though.
Part of the difficulty there is that we don't really use mapit anymore
and haven't worked on it since April 2002.
Bernhard
--
Intevation GmbH http://intevation.de/
Skencil http://skencil.org/
Thuban http://thuban.intevation.org/
More information about the Mapit
mailing list
This site is hosted by Intevation GmbH (Datenschutzerklärung und Impressum | Privacy Policy and Imprint)