Fixed string problem

svn: r1292
This commit is contained in:
Don Allingham 2003-02-08 23:50:36 +00:00
parent 8eadc54ac2
commit a78ab76040

View File

@ -83,14 +83,14 @@ class ImgManip:
if im.mode != 'RGB': if im.mode != 'RGB':
im.draft('RGB',im.size) im.draft('RGB',im.size)
im = im.convert("RGB") im = im.convert("RGB")
im.save(dest,string.upper(pil)) im.save(dest,pil.upper())
def fmt_convert(self,dest,pil): def fmt_convert(self,dest,pil):
im = PIL.Image.open(self.src) im = PIL.Image.open(self.src)
if im.mode != 'RGB': if im.mode != 'RGB':
im.draft('RGB',im.size) im.draft('RGB',im.size)
im = im.convert("RGB") im = im.convert("RGB")
im.save(dest,string.upper(pil)) im.save(dest,pil.upper())
def fmt_data(self,pil): def fmt_data(self,pil):
g = StringIO.StringIO() g = StringIO.StringIO()
@ -98,7 +98,7 @@ class ImgManip:
if im.mode != 'RGB': if im.mode != 'RGB':
im.draft('RGB',im.size) im.draft('RGB',im.size)
im = im.convert("RGB") im = im.convert("RGB")
im.save(g,string.upper(pil)) im.save(g,pil.upper())
g.seek(0) g.seek(0)
buf = g.read() buf = g.read()
g.close() g.close()
@ -110,7 +110,7 @@ class ImgManip:
if im.mode != 'RGB': if im.mode != 'RGB':
im.draft('RGB',im.size) im.draft('RGB',im.size)
im = im.convert("RGB") im = im.convert("RGB")
return im.tostring(string.upper(pil),"RGB") return im.tostring(pil.upper(),"RGB")
def jpg_thumbnail(self,dest,width,height): def jpg_thumbnail(self,dest,width,height):
self.fmt_thumbnail(dest,width,height,"jpeg") self.fmt_thumbnail(dest,width,height,"jpeg")