After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 586094 - gtk.gdk.Pixbuf.add_alpha requires chars instead of ints
gtk.gdk.Pixbuf.add_alpha requires chars instead of ints
Status: RESOLVED FIXED
Product: pygtk
Classification: Bindings
Component: gdk
2.14.x
Other Linux
: Normal normal
: ---
Assigned To: Nobody's working on this now (help wanted and appreciated)
Python bindings maintainers
Depends on:
Blocks:
 
 
Reported: 2009-06-17 08:17 UTC by Josselin Mouette
Modified: 2009-06-17 22:13 UTC
See Also:
GNOME target: ---
GNOME version: 2.25/2.26



Description Josselin Mouette 2009-06-17 08:17:39 UTC
Original report from Luca Bruno: http://bugs.debian.org/525699

The documentation describes its usage using integers. More over, the method
doesn't seem to work correctly. Apparently, the alpha isn't added even using
chr(0), chr(0), chr(0).
>>> import gtk
>>> pixbuf = gtk.gdk.Pixbuf (gtk.gdk.COLORSPACE_RGB, True, 8, 100, 100)
>>> pixbuf.add_alpha (True, 0, 0, 0)
Traceback (most recent call last):
  • File "<stdin>", line 1 in <module>
TypeError: GdkPixbuf.add_alpha() argument 2 must be char, not int
>>>
Comment 1 Paul Pogonyshev 2009-06-17 22:13:41 UTC
Fixed, thanks.  The patch badly breaks backwards compatibility, but there is likely no code using this function anyway, as it seems pretty impossible to use in its pre-2.16 state.