func NewImageFromURL(url string) (*ebiten.Image, error) {
	res, err := http.Get(url)
	if err != nil {
		return nil, err
	}
	defer res.Body.Close()

	img, _, err := image.Decode(res.Body)
	if err != nil {
		return nil, err
	}

	eimg, _ := ebiten.NewImageFromImage(img, ebiten.FilterDefault)
	return eimg, nil
}
func NewImageFromURL(url string) (*ebiten.Image, error) {
	res, err := http.Get(url)
	if err != nil {
		return nil, err
	}
	defer res.Body.Close()

	img, _, err := image.Decode(res.Body)
	if err != nil {
		return nil, err
	}

	eimg, _ := ebiten.NewImageFromImage(img, ebiten.FilterDefault)
	return eimg, nil
}
func NewImageFromURL ( url string ) ( * ebiten . Image , error ) { res , err := http . Get ( url ) if err != nil { return nil , err } defer res . Body . Close ( ) img , _ , err := image . Decode ( res . Body ) if err != nil { return nil , err } eimg , _ := ebiten . NewImageFromImage ( img , ebiten . FilterDefault ) return eimg , nil }
// NewImageFromURL creates a new ebiten.Image from the given URL.
//
// Image decoders must be imported when using NewImageFromURL. For example,
// if you want to load a PNG image, you'd need to add `_ "image/png"` to the import section.
//
// FilterDefault is used at NewImgeFromImage internally.
NewImageFromURL creates a new ebiten . Image from the given URL . Image decoders must be imported when using NewImageFromURL . For example if you want to load a PNG image you d need to add _ image / png to the import section . FilterDefault is used at NewImgeFromImage internally .