Public bug reported: Version: 2.12.0-0ubuntu2 I have this problem since I updated from Ubuntu 6.06 to 7.10
If you feed large chunks of data to gtk.gdk.PixbufLoader you get an exception if you close the loader. Here is the exception: ===> LANG=C python /home/guettli/tmp/t.py Traceback (most recent call last): File "/home/guettli/tmp/t.py", line 6, in <module> p.close() gobject.GError: Error interpreting JPEG image file (Application transferred too few scanlines) Here is an example code: # t.py: import gtk p = gtk.gdk.PixbufLoader() data = open("t.jpg").read() # OK size 1,6K p.write(data) p.close() I investigated if the chunksize is 210953 Bytes, it fails. One bytes less loading does not fail, but the image looks broken (some rectangles are shifted and the colors don't match). If you use 140000 the image looks broken, but if you use 130000 as chunksize, the image looks good. Here is the script I used to check for the maximum size: import gtk chunksize=210950 while True: chunksize+=1 fd=open("/home/guettli/pictures/ixus/2002-01-04/IMG_0120.JPG") p = gtk.gdk.PixbufLoader() while True: data=fd.read(chunksize) if not data: break p.write(data) print 'chunksize', chunksize p.close() ===> uname -a Linux r51 2.6.22-14-generic #1 SMP Tue Feb 12 07:42:25 UTC 2008 i686 GNU/Linux ** Affects: python-gtk2 (Ubuntu) Importance: Undecided Status: New -- gtk.gdk.PixbufLoader fails if chunksize is large https://bugs.launchpad.net/bugs/193993 You received this bug notification because you are a member of Ubuntu Bugs, which is subscribed to Ubuntu. -- ubuntu-bugs mailing list ubuntu-bugs@lists.ubuntu.com https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs