This commit is contained in:
Kovid Goyal 2025-10-09 16:12:39 +05:30
parent a0f6152aee
commit c48ed15007
No known key found for this signature in database
GPG key ID: 06BC317B515ACE7C

View file

@ -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()))