3798: Narrative Web Report error 'Too many open files: ...'

svn: r15163
This commit is contained in:
Doug Blank 2010-04-16 15:36:31 +00:00
parent 3e7ae3aeb5
commit 02d78e66ef

View File

@ -110,6 +110,7 @@ def resize_to_jpeg_buffer(source, width, height):
filed, dest = tempfile.mkstemp()
img = gtk.gdk.pixbuf_new_from_file(source)
scaled = img.scale_simple(int(width), int(height), gtk.gdk.INTERP_BILINEAR)
os.close(filed)
scaled.save(dest, 'jpeg')
ofile = open(dest, mode='rb')
data = ofile.read()