不使用gocv画图,仅支持rectangle和polygon
zhangmeng
2019-11-22 26e9987cd183715588aa113030db44fc376ef6b4
godraw.go
@@ -50,7 +50,7 @@
   for j := bounds.Min.Y; j < bounds.Max.Y; j++ {
      for i := bounds.Min.X; i < bounds.Max.X; i++ {
         r, g, b, _ := img.At(i, j).RGBA()
         data = append(data, byte(r>>8), byte(g>>8), byte(b>>8))
         data = append(data, byte(b>>8), byte(g>>8), byte(r>>8))
      }
   }
   return data