< Previous | Contents | Next >

attributes (table, required)

A table of options which describe the width, height, filter and other parameters used by the resize function. See the Options section below.

Options


Name

Description

RSZ_Filter

A string describing which filter method should be used for the resize. Valid options are :

"TopLeft", "Nearest", "Box", "Linear", "BiLinear", "Quadratic", "BiCubic", "Cubic", "BSpline", "CatmulRom", "Gaussian", "Mitchell", "Lanczos", "Sinc", "Bessel"

RSZ_Window

A string that specifies the Windowing method to use with Lanczos and Sinc filter methods. Not required for other filter types.

"Hanning", "Hamming", "Blackman", "Kaiser"

RSZ_Width

An integer specifying the width of the result image in pixels

RSZ_Height

An integer specifying the height of the result image in pixels

RSZ_Depth

An integer specifying the color depth of the result image, Usually left nil.

RSZ_XSize

A numeric value representing the horizontal scale of the result image. Provides an alternative to RSZ_Width. A value of 1.0 represents 100%, or no change.

RSZ_YSize

A numeric value representing the vertical scale of the result image. Provides an alternative to RSZ_Height. A value of 1.0 represents 100%, or no change.

Example


function Process(req)

local bg = InBackground:GetValue(req)


local out = Image({IMG_Like = img, IMG_Width = 1920, IMG_Height = 1080} bg:Resize(out, {RSZ_Filter = "Cubic", })


OutImage:Set(req, out)

end