X-Git-Url: http://dolda2000.com/gitweb/?a=blobdiff_plain;f=manga%2Freader.py;h=ca8f43337d5d374de45308a324a02763fc9af7df;hb=04f773e3923930aa517e196962e4304eecabd1ce;hp=73b6bd4726c810078f446e94005cefb7449aa7f5;hpb=0b60fcf810e2197790f6eb953ce078fd62c6e4f1;p=automanga.git diff --git a/manga/reader.py b/manga/reader.py index 73b6bd4..ca8f433 100644 --- a/manga/reader.py +++ b/manga/reader.py @@ -1,4 +1,4 @@ -import threading, gtk, gio, gobject +import threading, gtk, gobject import lib, profile class notdone(Exception): pass @@ -75,7 +75,7 @@ class imgload(future): self.start() def value(self): - buf = bytearray() + buf = gtk.gdk.PixbufLoader() with self.page.open() as st: self.p = 0 self.st = st @@ -84,14 +84,11 @@ class imgload(future): if read == "": break self.p += len(read) - buf.extend(read) + buf.write(read) self.progcb() self.st = None - with gtk.gdk.lock: - try: - return gtk.gdk.pixbuf_new_from_stream(gio.memory_input_stream_new_from_data(str(buf))) - finally: - gtk.gdk.flush() + buf.close() + return buf.get_pixbuf() @property def prog(self):