[Image-SIG] problems with Imaging 1.0b1
Jens Gelhaar
gelhaar@csi.com
Wed, 30 Jun 1999 00:59:16 +0200
This is a multi-part message in MIME format.
------=_NextPart_000_0010_01BEC293.C6C47F20
Content-Type: text/plain;
charset="iso-8859-1"
Content-Transfer-Encoding: quoted-printable
Hi
I use the following versions, Python 1.5.2 , Imaging 1.0b1.
I tried to run the simple test:
import os, sys
import Image
for infile in sys.argv[1:]:
outfile =3D os.path.splitext(infile)[0] + "_NEU.JPG"
print outfile
if infile !=3D outfile:
try:
im =3D Image.open(infile)
im.save(outfile,"JPEG")
except IOError:
print "cannot create thumbnail for", infile
but, I got alway the following error message
File "F:\Python\JPEGKleinerMachen.py", line 11, in ?
im.save(outfile,"JPEG")
File "E:\Programme\Python\Lib\imaging\Image.py", line 654, in save
self.load()
File "E:\Programme\Python\Lib\imaging\ImageFile.py", line 134, in load
d =3D Image._getdecoder(self.mode, d, a, self.decoderconfig)
File "E:\Programme\Python\Lib\imaging\Image.py", line 225, in =
_getdecoder
return apply(decoder, (mode,) + args + extra)
TypeError: illegal argument type for built-in operation
What is wrong? The example is from the tuturial?
------=_NextPart_000_0010_01BEC293.C6C47F20
Content-Type: text/html;
charset="iso-8859-1"
Content-Transfer-Encoding: quoted-printable
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML><HEAD>
<META content=3D"text/html; charset=3Diso-8859-1" =
http-equiv=3DContent-Type>
<META content=3D"MSHTML 5.00.2014.210" name=3DGENERATOR>
<STYLE></STYLE>
</HEAD>
<BODY bgColor=3D#ddd7d0>
<DIV><FONT color=3D#0000ff face=3DArial size=3D3>
<P><FONT color=3D#000000 size=3D2>Hi</FONT></P>
<P><FONT color=3D#000000 size=3D2>I use the following versions, <FONT =
color=3D#000000=20
size=3D2>Python 1.5.2 , Imaging 1.0b1.</FONT></P></FONT>
<P><FONT color=3D#000000 size=3D2>I tried to run the simple =
test:</FONT></P>
<P><FONT color=3D#000000 face=3D"Courier New" size=3D2>import os, =
sys<BR>import=20
Image</FONT></P>
<P><FONT color=3D#000000 face=3D"Courier New" size=3D2>for infile in=20
sys.argv[1:]:<BR> outfile =3D =
os.path.splitext(infile)[0] +=20
"_NEU.JPG"<BR> print outfile<BR> if =
infile=20
!=3D outfile:<BR> =20
try:<BR>  =
; im =3D=20
Image.open(infile)<BR> &nb=
sp; =20
im.save(outfile,"JPEG")<BR> =
except=20
IOError:<BR> &=
nbsp;=20
print "cannot create thumbnail for", infile<BR></FONT></P>
<P><FONT color=3D#000000 size=3D2>but, I got alway the following error=20
message</P></FONT></DIV>
<DIV><FONT color=3D#000000 face=3D"Courier New" size=3D2>File=20
"F:\Python\JPEGKleinerMachen.py", line 11, in ?</FONT><FONT=20
face=3D"Courier New"></FONT></DIV>
<DIV><FONT color=3D#000000 face=3D"Courier New"=20
size=3D2>im.save(outfile,"JPEG")</FONT></DIV>
<DIV><FONT color=3D#000000 face=3D"Courier New" size=3D2>File=20
"E:\Programme\Python\Lib\imaging\Image.py", line 654, in =
save</FONT></DIV>
<DIV><FONT color=3D#000000 face=3D"Courier New" =
size=3D2>self.load()</FONT></DIV>
<DIV><FONT color=3D#000000 face=3D"Courier New" size=3D2>File=20
"E:\Programme\Python\Lib\imaging\ImageFile.py", line 134, in =
load</FONT></DIV>
<DIV><FONT color=3D#000000 face=3D"Courier New" size=3D2>d =3D=20
Image._getdecoder(self.mode, d, a, self.decoderconfig)</FONT></DIV>
<DIV><FONT color=3D#000000 face=3D"Courier New" size=3D2>File=20
"E:\Programme\Python\Lib\imaging\Image.py", line 225, in=20
_getdecoder</FONT></DIV>
<DIV><FONT color=3D#000000 face=3D"Courier New" size=3D2>return =
apply(decoder, (mode,)=20
+ args + extra)</FONT></DIV>
<DIV><FONT color=3D#000000 face=3D"Courier New" size=3D2>TypeError: =
illegal argument=20
type for built-in operation</FONT></DIV>
<DIV></FONT><FONT color=3D#008080></FONT> </DIV>
<DIV><FONT face=3DArial size=3D2>What is wrong? The example is from the=20
tuturial?</FONT></DIV></BODY></HTML>
------=_NextPart_000_0010_01BEC293.C6C47F20--