コード例 #1
0
ファイル: canvas.go プロジェクト: mishudark/gosexy
// Adds random noise to the canvas.
func (cv Canvas) AddNoise() bool {
	status := C.MagickAddNoiseImage(cv.wand, C.GaussianNoise)
	if status == C.MagickFalse {
		return false
	}
	return true
}
コード例 #2
0
ファイル: canvas.go プロジェクト: phacops/canvas
// Adds random noise to the canvas.
func (self *Canvas) AddNoise() error {
	success := C.MagickAddNoiseImage(self.wand, C.GaussianNoise)

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

	return nil
}