- commit
- 4444a7dc510592188884ddf07b67ebebac15efea
- parent
- 622db714a433d12b4f7ee689a9af37697d6940c2
- Author
- wangbei <wangbei@qiyi.com>
- Date
- 2019-01-07 03:13
bgClr is always zero, no need to set
Diffstat
| M | qrcode.go | 5 | ----- |
1 files changed, 0 insertions, 5 deletions
diff --git a/qrcode.go b/qrcode.go
@@ -293,13 +293,8 @@ func (q *QRCode) Image(size int) image.Image {
293 293 // Saves a few bytes to have them in this order
294 294 p := color.Palette([]color.Color{q.BackgroundColor, q.ForegroundColor})
295 295 img := image.NewPaletted(rect, p)
296 -1 bgClr := uint8(img.Palette.Index(q.BackgroundColor))
297 296 fgClr := uint8(img.Palette.Index(q.ForegroundColor))
298 297
299 -1 for i := range img.Pix {
300 -1 img.Pix[i] = bgClr
301 -1 }
302 -1
303 298 bitmap := q.symbol.bitmap()
304 299 for y, row := range bitmap {
305 300 for x, v := range row {