panlei
2019-07-02 f285ad8a98bbd1241aed1d09cc796d532b04413a
用个100代替宽高试试
1个文件已修改
2 ■■■ 已修改文件
util/image.go 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
util/image.go
@@ -26,7 +26,7 @@
    //jpeg.Encode(f, subImg, nil)                         //写入文件
    img,_ := gocv.NewMatFromBytes(100,100,gocv.MatTypeCV8UC3,dbyte)
    rect := image.Rect(x0,y0,x1,y1)
    rect := image.Rect(x0,y0,x0+100,y0+100)
    region := img.Region(rect)
    bytes, _ := gocv.IMEncode(".jpg", region)
    return bytes