Abstracted out the use of Imagick vs. PIL

svn: r741
This commit is contained in:
Don Allingham
2002-02-02 01:14:15 +00:00
parent 26e369fd8c
commit 7ccb8977aa
15 changed files with 2085 additions and 1346 deletions

View File

@ -249,7 +249,11 @@ class Gallery(ImageSelect):
def add_thumbnail(self, photo):
object = photo.getReference()
name = utils.thumb_path(self.db.getSavePath(),object)
thumb = GdkImlib.Image(name)
try:
thumb = GdkImlib.Image(name)
except IOError,msg:
gnome.ui.GnomeErrorDialog(_("Could not import %s - %s") % (name,msg))
return
self.icon_cache.append(thumb)
description = object.getDescription()
if len(description) > 50: