示例#1
0
// Convolves the canvas with a Gaussian function given its standard deviation.
func (cv Canvas) Blur(sigma float64) bool {
	status := C.MagickBlurImage(cv.wand, C.double(0), C.double(sigma))
	if status == C.MagickFalse {
		return false
	}
	return true
}
示例#2
0
文件: canvas.go 项目: phacops/canvas
// Convolves the canvas with a Gaussian function given its standard deviation.
func (self *Canvas) Blur(sigma float64) error {
	success := C.MagickBlurImage(self.wand, C.double(0), C.double(sigma))

	if success == C.MagickFalse {
		return fmt.Errorf("Could not blur image: %s", self.Error())
	}

	return nil
}