On Thursday, December 17, 2015 at 5:27:28 AM UTC+4, Nobody wrote:
> On Wed, 16 Dec 2015 06:04:37 -0800, fsn761304 wrote:
>
> > pixbufObj = Gdk.pixbuf_get_from_window(window, x, y, width, height) ...
> > image = Image.frombuffer("RGB", (width, height),
> > pixbufObj.get_pixels(), 'raw', 'RGB', 0, 1)
>
> The second-to-last argument should probably be Gdk.pixbuf_get_rowstride()
> rather than 0.
No, this:
image = Image.frombuffer("RGB", (width, height),
pixbufObj.get_pixels(), 'raw', 'RGB',
Gdk.pixbuf_get_rowstride(), 1)
doesn't work:
AttributeError: 'gi.repository.Gdk' object has no attribute
'pixbuf_get_rowstride'
--
https://mail.python.org/mailman/listinfo/python-list