panlei
2019-07-02 f8427a8ee8b3cb11a210aae9ec9e120cfc686010
。。。[C
1个文件已修改
5 ■■■■■ 已修改文件
util/image.go 5 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
util/image.go
@@ -26,7 +26,8 @@
    //jpeg.Encode(f, subImg, nil)                         //写入文件
    img,_ := gocv.NewMatFromBytes(int(y1-y0),int(x1-x0),gocv.MatTypeCV8UC3,dbyte)
    region := img.Region(image.Rectangle{image.Point{x0,y0},image.Point{x1,y1}})
    rect := image.Rect(x0,y0,x1,y1)
    region := img.Region(rect)
    bytes, _ := gocv.IMEncode(".jpg", region)
    return bytes
}
}