func NewImageFromImage(source image.Image, filter Filter) (*Image, error) {
	size := source.Bounds().Size()

	width, height := size.X, size.Y

	s := shareable.NewImage(width, height)
	i := &Image{
		mipmap: newMipmap(s),
		filter: filter,
	}
	i.addr = i

	_ = i.ReplacePixels(graphics.CopyImage(source))
	return i, nil
}
func NewImageFromImage(source image.Image, filter Filter) (*Image, error) {
	size := source.Bounds().Size()

	width, height := size.X, size.Y

	s := shareable.NewImage(width, height)
	i := &Image{
		mipmap: newMipmap(s),
		filter: filter,
	}
	i.addr = i

	_ = i.ReplacePixels(graphics.CopyImage(source))
	return i, nil
}
func NewImageFromImage ( source image . Image , filter Filter ) ( * Image , error ) { size := source . Bounds ( ) . Size ( ) width , height := size . X , size . Y s := shareable . NewImage ( width , height ) i := & Image { mipmap : newMipmap ( s ) , filter : filter , } i . addr = i _ = i . ReplacePixels ( graphics . CopyImage ( source ) ) return i , nil }
// NewImageFromImage creates a new image with the given image (source).
//
// If source's width or height is less than 1 or more than device-dependent maximum size, NewImageFromImage panics.
//
// filter argument is just for backward compatibility.
// If you are not sure, specify FilterDefault.
//
// Error returned by NewImageFromImage is always nil as of 1.5.0-alpha.
NewImageFromImage creates a new image with the given image ( source ) . If source s width or height is less than 1 or more than device - dependent maximum size NewImageFromImage panics . filter argument is just for backward compatibility . If you are not sure specify FilterDefault . Error returned by NewImageFromImage is always nil as of 1 . 5 . 0 - alpha .