Image thumbnails, source bug fixes

svn: r71
This commit is contained in:
Don Allingham
2001-05-31 17:57:14 +00:00
parent daa11db881
commit c2b078e0a7
14 changed files with 530 additions and 77 deletions

View File

@@ -27,7 +27,7 @@ import const
import string
try:
import PIL
import Image
no_pil = 0
except:
no_pil = 1
@@ -79,10 +79,10 @@ class AbiWordDoc(TextDoc):
tag = string.replace(base,'.','_')
if no_pil:
cmd = "%s -size %dx%d %s %s" % (const.convert,width,height,file,base)
cmd = "%s -geometry %dx%d '%s' '%s'" % (const.convert,width,height,file,base)
os.system(cmd)
else:
im = PIL.Image.open(file)
im = Image.open(file)
im.thumbnail((width,height))
im.save(base,"PNG")