func NewImage(name string, r io.Reader) Image {
	var err error
	img := imageStruct{
		geometry: geometry{
			valid:     false,
			name:      name,
			geomType:  ImageType,
			dimension: 2,
		},
	}
	img.data, _, err = image.Decode(r)
	if err != nil {
		return &img
	}
	img.valid = true
	return &img
}
NewImage creates a new image based on the reader. Supported formats are JPG and PNG
package geom
import (
	"image"
	"image/draw"
	_ "image/jpeg"
	_ "image/png"
	"io"
	"github.com/go-gl/mathgl/mgl32"
)
type Image interface {
	Geometry2D
	RGBA() *image.RGBA
}
type imageStruct struct {
	geometry
	data image.Image
}