bufimage return type is uchar*, not int .