Fixed date handling
svn: r496
This commit is contained in:
parent
aebc5bff54
commit
cc4da84208
@ -35,10 +35,8 @@ _ = intl.gettext
|
||||
try:
|
||||
import PIL.Image
|
||||
no_pil = 0
|
||||
print "pil ok"
|
||||
except:
|
||||
no_pil = 1
|
||||
print "pil bad"
|
||||
|
||||
#-------------------------------------------------------------------------
|
||||
#
|
||||
@ -127,13 +125,11 @@ def mk_thumb(source,dest,size):
|
||||
|
||||
if no_pil:
|
||||
cmd = "%s -geometry %dx%d '%s' '%s'" % (const.convert,size,size,source,dest)
|
||||
print cmd
|
||||
os.system(cmd)
|
||||
else:
|
||||
try:
|
||||
im = PIL.Image.open(source)
|
||||
im.thumbnail((size,size))
|
||||
print "save",source,dest
|
||||
im.save(dest,"JPEG")
|
||||
except:
|
||||
pass
|
||||
|
Loading…
Reference in New Issue
Block a user