Example #1
0
// 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
}
Example #2
0
// 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
}