ImageKernelConvolution function added
This commit is contained in:
parent
bf03596ee4
commit
19bdd59547
2 changed files with 14 additions and 0 deletions
|
@ -381,6 +381,13 @@ func ImageBlurGaussian(image *Image, blurSize int32) {
|
|||
C.ImageBlurGaussian(cimage, cblurSize)
|
||||
}
|
||||
|
||||
// ImageKernelConvolution - Apply custom square convolution kernel to image
|
||||
func ImageKernelConvolution(image *Image, kernel []float32) {
|
||||
cimage := image.cptr()
|
||||
ckernel := (*C.float)(unsafe.Pointer(&kernel[0]))
|
||||
C.ImageKernelConvolution(cimage, ckernel, C.int(len(kernel)))
|
||||
}
|
||||
|
||||
// ImageResize - Resize an image (bilinear filtering)
|
||||
func ImageResize(image *Image, newWidth, newHeight int32) {
|
||||
cimage := image.cptr()
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue