I didn't test all methods, but in Ubuntu 12.04 at least  'get_pixels()'
and 'savev()' seems to work fine:

using your example:

$ python
>>> from gi.repository import Gtk, GdkPixbuf
>>> t = Gtk.IconTheme.get_default()
>>> i = t.lookup_icon('edit-find', 16, 0)
>>> p = GdkPixbuf.Pixbuf.new_from_file(i.get_filename())
>>> a = p.get_pixels()
>>> 
>>> print type(a)
<type 'str'>
>>> print len(a)
1024
>>> print "%r" % a[100:120]
'\x94\xa8\xd7\xfb/e\xb0\xea)a\xaeB\xff\xff\xff\x00\xff\xff\xff\x00'
>>> 
>>> try:
...     print 'Save pixbuf to file'
...     p.savev('edit-find.png', 'png', [], [])
...     print "and it works"
... except AttributeError as e:
...     print e
... 
Save pixbuf to file
True
and it works
>>>

-- 
You received this bug notification because you are a member of Ubuntu
Bugs, which is subscribed to Ubuntu.
https://bugs.launchpad.net/bugs/888305

Title:
  pixbuf methods not working

To manage notifications about this bug go to:
https://bugs.launchpad.net/ubuntu/+source/gdk-pixbuf/+bug/888305/+subscriptions

-- 
ubuntu-bugs mailing list
ubuntu-bugs@lists.ubuntu.com
https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs

Reply via email to