pixbuf methods not working

Bug #888305 reported by cdar
20
This bug affects 4 people
Affects Status Importance Assigned to Milestone
gdk-pixbuf (Ubuntu)
Confirmed
Low
Unassigned

Bug Description

python - gir bindings

GdkPixbuf.Pixbuf methods:
- 'get_pixels' returns int
- missing: 'save_to_buffer', 'save_to_callback', 'save_to_stream', 'save'
- not working: 'save_to_bufferv', 'save_to_callbackv', 'save_to_stream_finish', 'savev'

Ubuntu 11.10

cdar (cdar07)
description: updated
cdar (cdar07)
description: updated
Revision history for this message
Sebastien Bacher (seb128) wrote :

Thank you for taking the time to report this bug and helping to make Ubuntu better. Unfortunately, we cannot work on this bug because your description didn't include enough information. You may find it helpful to read "How to report bugs effectively" http://www.chiark.greenend.org.uk/~sgtatham/bugs.html. We'd be grateful if you would then provide a more complete description of the problem.

We have instructions on debugging some types of problems at http://wiki.ubuntu.com/DebuggingProcedures

At a minimum, we need:
1. the specific steps or actions you took that caused you to encounter the problem,
2. the behavior you expected, and
3. the behavior you actually encountered (in as much detail as possible).
Thanks!

affects: gtk+3.0 (Ubuntu) → ubuntu
Changed in ubuntu:
importance: Undecided → Low
status: New → Incomplete
Revision history for this message
cdar (cdar07) wrote :

This is an example which describes the bugs.

Oliver Sauder (sao)
Changed in ubuntu:
status: Incomplete → New
Revision history for this message
Launchpad Janitor (janitor) wrote :

Status changed to 'Confirmed' because the bug affects multiple users.

Changed in gdk-pixbuf (Ubuntu):
status: New → Confirmed
Oliver Sauder (sao)
affects: ubuntu → gdk-pixbuf (Ubuntu)
Changed in gdk-pixbuf (Ubuntu):
status: New → Confirmed
Revision history for this message
MestreLion (mestrelion) wrote :

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
>>>

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.