func (img *Image) GetSource() image.Image {
	return img.src
}
GetSource returns source image.Image.
package img
import (
	"bytes"
	"image"
	"image/color"
	"image/draw"
	"image/jpeg"
	"io"
	"os"
	"path/filepath"
	"strings"
	"github.com/abulo/ratel/v2/img/fontx"
	"github.com/abulo/ratel/v2/util"
	"github.com/disintegration/imaging"
	"github.com/golang/freetype"
	"github.com/h2non/bimg"
	"github.com/pkg/errors"
	"golang.org/x/image/font"
)
const (
	DefaultDPI = 72
)
type Image struct {
	src image.Image
}
func OpenLocalFile(filename string, opts ...imaging.DecodeOption) (*Image, error) {
	ext := filepath.Ext(filename)
	extension := strings.ToLower(strings.TrimPrefix(ext, "."))
	extAry := []string{"jpg", "png", "webp", "jpeg"}
	if !util.InArray(extension, extAry) {
		return nil, errors.New("No Support file")
	}
	newFilename := filename + ".jpg"
	if extension == "webp" {
		if !util.FileExists(newFilename) {
			buffer, err := bimg.Read(filename)
			if err != nil {
				return nil, err
			}
			newCovImage, err := bimg.NewImage(buffer).Convert(bimg.JPEG)
			if err != nil {
				return nil, err
			}
			err = bimg.Write(newFilename, newCovImage)
			if err != nil {
				return nil, err
			}
		}
		filename = newFilename
	}
	img, err := imaging.Open(filename, opts...)
	if err != nil {
		return nil, err
	}
	return &Image{img}, nil
}