---
panlei
2019-07-02 0c8dffc024fc2f8f6b185a2b85387309e4e62aca
util/image.go
@@ -25,8 +25,8 @@
   //defer f.Close()                                    //关闭文件
   //jpeg.Encode(f, subImg, nil)                     //写入文件
   img,_ := gocv.NewMatFromBytes(int(y1-y0),int(x1-x0),gocv.MatTypeCV8UC3,dbyte)
   rect := image.Rect(x0,y0,x1,y1)
   img,_ := gocv.NewMatFromBytes(100,100,gocv.MatTypeCV8UC3,dbyte)
   rect := image.Rect(x0,y0,x0+100,y0+100)
   region := img.Region(rect)
   bytes, _ := gocv.IMEncode(".jpg", region)
   return bytes