Skip to content

Instantly share code, notes, and snippets.

View riyadhalnur's full-sized avatar
🥚

Riyadh Al Nur riyadhalnur

🥚
View GitHub Profile
@riyadhalnur
riyadhalnur / redraw.go
Last active January 9, 2020 04:23
Redraw a transparent PNG into one with an opaque background. This particular code will redraw with a white background.
package main
import (
"image"
gcolor "image/color"
"image/draw"
"github.com/go-playground/colors"
)
func redrawImage(imgBytes []byte) error {