diff options
author | hploetz <hploetz@f711b948-2313-0410-aaa9-d29f33439f0b> | 2007-06-09 00:35:51 +0000 |
---|---|---|
committer | hploetz <hploetz@f711b948-2313-0410-aaa9-d29f33439f0b> | 2007-06-09 00:35:51 +0000 |
commit | c684d3632c31a74ff8e563efed5b0f68087c5cdb (patch) | |
tree | 0a2a96a662209e7a47e8b1ae67ac86797e839999 /gui | |
parent | 6c5bdad15185fc76505fdda7749b98e9a6d7a0bb (diff) |
Change in-memory format to bmp. (Conversion to png takes 0.8s which feels laggy, conversion to bmp takes 0.2s which is barely noticeable)
git-svn-id: svn+ssh://localhost/home/henryk/svn/cyberflex-shell/trunk@232 f711b948-2313-0410-aaa9-d29f33439f0b
Diffstat (limited to 'gui')
-rw-r--r-- | gui/__init__.py | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/gui/__init__.py b/gui/__init__.py index 984cf6c..c9d1b1e 100644 --- a/gui/__init__.py +++ b/gui/__init__.py @@ -1,15 +1,17 @@ import gtk,gtk.glade,gobject -import os +import os, time class Converter: SUPPORTS = ["jp2"] def convert(type, image_data): - stdin, stdout = os.popen2("convert %s:- png:-" % type) + stdin, stdout = os.popen2("convert %s:- bmp:-" % type) + n = time.time() stdin.write(image_data) stdin.close() return_data = stdout.read() stdout.close() + #print "Took", time.time()-n, "seconds for conversion" return return_data convert = staticmethod(convert) |