...
This commit is contained in:
parent
a0f6152aee
commit
c48ed15007
1 changed files with 2 additions and 2 deletions
|
|
@ -17,9 +17,9 @@ var _ = fmt.Print
|
|||
|
||||
func encode_rgba(output io.Writer, img image.Image) (err error) {
|
||||
var final_img *image.NRGBA
|
||||
switch img.(type) {
|
||||
switch ti := img.(type) {
|
||||
case *image.NRGBA:
|
||||
final_img = img.(*image.NRGBA)
|
||||
final_img = ti
|
||||
default:
|
||||
b := img.Bounds()
|
||||
final_img = image.NewNRGBA(image.Rect(0, 0, b.Dx(), b.Dy()))
|
||||
|
|
|
|||
Loading…
Reference in a new issue