scale_pixbuf_to_size

@accepts(GdkPixbuf.Pixbuf, Gtk.IconSize)
@returns(GdkPixbuf.Pixbuf)
def scale_pixbuf_to_size(pixbuf, size)

Creates a new GdkPixbuf from the original one, for a target of size, respecting the aspect ratio of the image.

pixbuf :

the GdkPixbuf containing the original image

size :

a stock icon size

Returns :

scaled GdkPixbuf