Example #1
0
// Private: returns wand's hexadecimal color.
func getPixelHexColor(p *C.PixelWand) string {
	var rgb [3]float64

	rgb[0] = float64(C.PixelGetRed(p))
	rgb[1] = float64(C.PixelGetGreen(p))
	rgb[2] = float64(C.PixelGetBlue(p))

	return fmt.Sprintf("#%02x%02x%02x", int(rgb[0]*255.0), int(rgb[1]*255.0), int(rgb[2]*255.0))
}
Example #2
0
func (self *Pixel) Green() float64 {
	return float64(C.PixelGetGreen(self.wand))
}
Example #3
0
// Returns the normalized green color of the pixel wand
func (pw *PixelWand) GetGreen() float64 {
	return float64(C.PixelGetGreen(pw.pw))
}