Skip to content

raylib.ImageKernelConvolution

JoeStrout edited this page Apr 29, 2026 · 2 revisions

Apply custom square convolution kernel to image NOTE: The convolution kernel matrix is expected to be square

Parameters

Parameter Default Value Note
image
kernel
kernelSize

Return value

None.

Notes

Example

img = raylib.LoadImage("photo.png")
// Apply a simple sharpen kernel (3x3)
kernel = [-1,-1,-1, -1,9,-1, -1,-1,-1]
raylib.ImageKernelConvolution img, kernel, 3
raylib.ExportImage img, "photo_sharp.png"
raylib.UnloadImage img

Clone this wiki locally