* src/ImgManip.py: convert to png instead of jpeg

* src/ReadGedcom.py: try to catch bad secondary index error.
* src/ReportUtils.py: provide privacy sanitation on a list
* src/NavWebPage.py: better handling of thumbnails, allow gallery
page to be disabled


svn: r5122
This commit is contained in:
Don Allingham
2005-08-25 01:42:58 +00:00
parent ee6ad290d1
commit 40042df8f6
5 changed files with 86 additions and 69 deletions

View File

@@ -35,7 +35,7 @@ class ImgManip:
def size(self):
try:
img = gtk.gdk.pixbuf_new_from_file(self.src)
except GError:
except gobject.GError:
return (0,0)
return (img.get_width(),img.get_height())
@@ -101,7 +101,7 @@ class ImgManip:
def _build_thumb_path(path):
base = os.path.expanduser('~/.gramps/thumb')
m = md5.md5(path)
return os.path.join(base,m.hexdigest()+'.jpg')
return os.path.join(base,m.hexdigest()+'.png')
def run_thumbnailer(cmd, frm, to):
sublist = {
@@ -132,7 +132,7 @@ def set_thumbnail_image(path,mtype=None):
ph = int(h*scale)
pixbuf = pixbuf.scale_simple(pw,ph,gtk.gdk.INTERP_BILINEAR)
pixbuf.save(_build_thumb_path(path),"jpeg")
pixbuf.save(_build_thumb_path(path),"png")
except:
print "Could not create thumbnail for",path,mtype