# Pixbuf from Gdk::Window

**URL:** <https://www.ruby-forum.com/t/pixbuf-from-gdk-window/240063>\
**Category:** Ruby-Gnome 2\
**Created:** [March 26, 2014, 5:47am UTC](https://www.ruby-forum.com/t/pixbuf-from-gdk-window/240063 "2014-03-26T05:47:06Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![Detlef\_R](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/d/58f4c7/32.png) [@Detlef\_R](https://www.ruby-forum.com/u/Detlef_R)\
**Post date:** [March 26, 2014, 5:47am UTC](https://www.ruby-forum.com/t/pixbuf-from-gdk-window/240063/1 "2014-03-26T05:47:06Z")

</div>

Hi,

I want to crate a Gdk::Pixbuf from the content of a Gdk::Window. In Gtk  
2.0 times there was the method Gdk::Pixbuf.from\_drawable. But this is  
removed in Gtk 3.0. In Gtk+ in C there is now the function  
gdk\_pixbuf\_get\_from\_window but I find no method in Gdk::Window that  
matches this. Is it not implemented?

Cheers detlef

---

<div class="post-metadata">

**Author:** ![Detlef\_R](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/d/58f4c7/32.png) [@Detlef\_R](https://www.ruby-forum.com/u/Detlef_R)\
**Post date:** [March 28, 2014, 1:29am UTC](https://www.ruby-forum.com/t/pixbuf-from-gdk-window/240063/2 "2014-03-28T01:29:39Z")

</div>

Hi,

2014-03-26 13:44 GMT+09:00 Detlef R. [removed\_email\_address@domain.invalid](mailto:removed_email_address@domain.invalid):

> I want to crate a Gdk::Pixbuf from the content of a Gdk::Window. In Gtk  
> 2.0 times there was the method Gdk::Pixbuf.from\_drawable. But this is  
> removed in Gtk 3.0. In Gtk+ in C there is now the function  
> gdk\_pixbuf\_get\_from\_window but I find no method in Gdk::Window that  
> matches this. Is it not implemented?

Thank you for the good report! It probably isn’t implemented yet.

[https://github.com/ruby-gnome2/ruby-gnome2/blob/master/gdk3/ext/gdk3/rbgdkpixbuf.c#L27](https://github.com/ruby-gnome2/ruby-gnome2/blob/master/gdk3/ext/gdk3/rbgdkpixbuf.c#L27)

We will implement sooner or later. 🙂

–  
myokoym

---

<div class="post-metadata">

**Author:** ![Detlef\_R](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/d/58f4c7/32.png) [@Detlef\_R](https://www.ruby-forum.com/u/Detlef_R)\
**Post date:** [March 30, 2014, 7:22pm UTC](https://www.ruby-forum.com/t/pixbuf-from-gdk-window/240063/3 "2014-03-30T19:22:21Z")

</div>

Hi,

i saw, that you implemented it. Thank you very much for this, cause now  
I can go further with my project 🙂

Cheers, detlef

Am 28.03.2014 01:29, schrieb Masafumi Y.:

---

<div class="post-metadata">

**Author:** ![Detlef\_R](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/d/58f4c7/32.png) [@Detlef\_R](https://www.ruby-forum.com/u/Detlef_R)\
**Post date:** [March 31, 2014, 5:41am UTC](https://www.ruby-forum.com/t/pixbuf-from-gdk-window/240063/4 "2014-03-31T05:41:25Z")

</div>

Yes, I’ve implemented. Please tell us if you find a problem.  
Good luck with your project 😉

–  
myokoym

2014-03-31 2:15 GMT+09:00 Detlef R. [removed\_email\_address@domain.invalid](mailto:removed_email_address@domain.invalid):
