Image handling fixes

svn: r1284
This commit is contained in:
Don Allingham
2003-02-03 19:24:27 +00:00
parent f7fea013a9
commit 0aa3cce886
15 changed files with 171 additions and 44 deletions

View File

@ -61,8 +61,6 @@ def import_media_object(filename,path,base):
type = Utils.get_mime_type(filename)
if type[0:5] == "image":
name = "%s/%s%s" % (path,base,ext)
#base = "%s%s" % (base,ext)
thumb = "%s/.thumb" % (path)
try:
@ -113,8 +111,7 @@ def scale_image(path,size):
scale = size / float(max(width,height))
try:
image1.scale_simple(int(scale*width), int(scale*height), gtk.gdk.INTERP_BILINEAR)
return image1
return image1.scale_simple(int(scale*width), int(scale*height), gtk.gdk.INTERP_BILINEAR)
except:
WarningDialog(_("Could not load image file %s") % path)
return gtk.gdk.pixbuf_new_from_file(const.icon)
@ -129,7 +126,7 @@ def mk_thumb(source,dest,size):
source = os.path.normpath(source)
dest = os.path.normpath(dest)
try:
if not os.path.exists(dir):
os.mkdir(dir)