func (ap *ANSIpixel) Render() string {
	if ap.upper {
		return fmt.Sprintf(
			"\033[48;2;%d;%d;%dm",
			ap.R, ap.G, ap.B,
		)
	}
	return fmt.Sprintf(
		"\033[38;2;%d;%d;%dm%s",
		ap.R, ap.G, ap.B,
		lowerHalfBlock,
	)
}
Render returns the ANSI-compatible string form of ANSI-pixel.
package ansimage
import (
	"errors"
	"fmt"
	"image"
	"image/color"
	"image/draw"
	_ "image/gif"   
	_ "image/jpeg"  
	_ "image/png"   
	"io"
	"strings"
	"github.com/disintegration/imaging"
	_ "golang.org/x/image/bmp"   
	_ "golang.org/x/image/tiff"  
	_ "golang.org/x/image/webp"  
)
const lowerHalfBlock = "\u2584"
const (
	ScaleModeResize = ScaleMode(iota)
	ScaleModeFill
	ScaleModeFit
)
const (
	BlockSizeY = 8
	BlockSizeX = 4
)
var (
	ErrHeightNonMoT = errors.New("ANSImage: height must be a Multiple of Two value")
	ErrInvalidBoundsMoT = errors.New("ANSImage: height or width must be >=2")
	ErrOutOfBounds = errors.New("ANSImage: out of bounds")
	errUnknownScaleMode = errors.New("ANSImage: unknown scale mode")
)
type ScaleMode uint8
type ANSIpixel struct {
	Brightness uint8
	R, G, B    uint8
	upper      bool
	source     *ANSImage
}
type ANSImage struct {
	h, w     int
	maxprocs int
	bgR      uint8
	bgG      uint8
	bgB      uint8
	pixmap   [][]*ANSIpixel
}