opencv/highgui.go
func EncodeImage(ext string, image unsafe.Pointer, params []int) *Mat {
	var firstParam *C.int
	if len(params) > 0 {
		var params_c []C.int
		for _, param := range params {
			params_c = append(params_c, C.int(param))
		}
		firstParam = &params_c[0]
	}
	ext_c := C.CString(ext)
	defer C.free(unsafe.Pointer(ext_c))

	rv := C.cvEncodeImage(ext_c, (image), firstParam)
	return (*Mat)(rv)
}
func EncodeImage(ext string, image unsafe.Pointer, params []int) *Mat {
	var firstParam *C.int
	if len(params) > 0 {
		var params_c []C.int
		for _, param := range params {
			params_c = append(params_c, C.int(param))
		}
		firstParam = &params_c[0]
	}
	ext_c := C.CString(ext)
	defer C.free(unsafe.Pointer(ext_c))

	rv := C.cvEncodeImage(ext_c, (image), firstParam)
	return (*Mat)(rv)
}
/* encode image and store the result as a byte vector (single-row 8uC1 matrix) */