Esempio n. 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))
}
Esempio n. 2
0
func (self *Pixel) Blue() float64 {
	return float64(C.PixelGetBlue(self.wand))
}
Esempio n. 3
0
// Returns the normalized blue color of the pixel wand
func (pw *PixelWand) GetBlue() float64 {
	return float64(C.PixelGetBlue(pw.pw))
}