Converting PIL GdkPixbuf
问题 How can I convert PIL Image in pixbuf?. I tried to change many examples but no solution import array from gi.repository import GdkPixbuf def image2pixbuf(self,im): arr = array.array('B', im.tostring()) height, width = im.size return GdkPixbuf.Pixbuf.new_from_data(arr, GdkPixbuf.Colorspace.RGB, True, 8, width, height, width * 4) Error TypeError: new_from_data () takes Exactly 9 arguments (7 given) I use Pygobject https://live.gnome.org/PyGObject 回答1: You are passing less arguments than