Package: gdk-pixbuf

Function gdk-pixbuf:pixbuf-scale-simple

Lambda List

gdk-pixbuf:pixbuf-scale-simple (pixbuf width height &optional interp)

Arguments

pixbuf -- a gdk-pixbuf:pixbuf object
width -- an integer for the width of the destination image
height -- an integer for the height of the destination image
interp -- an optional gdk-pixbuf:pixbuf-interp-type interpolation value for the transformation, the default value is :bilinear

Return Value

The new gdk-pixbuf:pixbuf object, or nil if not enough memory could be allocated for it.

Details

Create a new pixbuf containing a copy of pixbuf scaled to width x height. Leaves pixbuf unaffected. The interp mode should be :nearest if you want maximum speed, but when scaling down this mode is usually unusably ugly. The default interp mode should be :bilinear which offers reasonable quality and speed.

You can scale a sub-portion of pixbuf by creating a sub-pixbuf pointing into pixbuf, see the gdk-pixbuf:pixbuf-new-subpixbuf function.

For more complicated scaling/compositing see the gdk-pixbuf:pixbuf-scale and gdk-pixbuf:pixbuf-composite functions.
 

See also

2026-09-19