Package: gdk-pixbuf

Function gdk-pixbuf:pixbuf-scale

Lambda List

gdk-pixbuf:pixbuf-scale (src dest x y width height xoffset yoffset xscale  yscale &optional interp)

Arguments

src -- a gdk-pixbuf:pixbuf object
dest -- a gdk-pixbuf:pixbuf object into which to render the results
x -- an integer for the left coordinate for region to render
y -- an integer for the top coordinate for region to render
width -- an integer for the width of the region to render
height -- an integer for the height of the region to render
xoffset -- a number coerced to a double float for the offset in the x direction, currently rounded to an integer
yoffset -- a number coerce to a double float for the offset in the y direction, currently rounded to an integer
xscale -- a number coerced to a double float for the scale factor in the x direction
yscale -- a number coerced to a double float for the scale factor in the y direction
interp -- an optional gdk-pixbuf:pixbuf-interp-type interpolation value for the transformation, the default is :bilinear

Details

Creates a transformation of the source image src by scaling by xscale and yscale then translating by xoffset and yoffset, then renders the rectangle (x,y,width,height) of the resulting image onto the destination image replacing the previous contents.

Try to use the gdk-pixbuf:pixbuf-scale-simple function first, this function is the industrial-strength power tool you can fall back to if the simple implementation is not powerful enough.

If the source rectangle overlaps the destination rectangle on the same pixbuf, it will be overwritten during the scaling which results in rendering artifacts.
 

See also

2026-09-19