Package: gdk-pixbuf

Function gdk-pixbuf-scale-simple

Lambda List

gdk-pixbuf-scale-simple (src width height interp)

Arguments

src -- a gdk-pixbuf object
width -- an integer with the width of destination image
height -- an integer with the height of destination image
interp -- a gdk-interp-type interpolation type for the transformation

Return Value

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

Details

Create a new gdk-pixbuf object containing a copy of src scaled to width x height. Leaves src unaffected. The interp mode should be :nearest if you want maximum speed, but when scaling down the :nearest 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 src by creating a sub-pixbuf pointing into src, see the gdk-pixbuf-new-subpixbuf function.

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

See also

2021-12-12