Documentation
¶
Index ¶
- Constants
- Variables
- func ConvertToNRGBA(img image.Image) *image.NRGBA
- func Download(url, outpath string)
- func MakeColor(a interface{}) color.Color
- func ParseColor(s string) (color.RGBA, error)
- func ParseHexColor(s string) (c color.RGBA, err error)
- func ToByte(data []uint32) []byte
- type ColorInfo
- type Image
- func (tile *Image) Background(background_any interface{}) *Image
- func (tile *Image) Circle() *Image
- func (tile *Image) Export() string
- func (tile *Image) Mirror() *Image
- func (tile *Image) Paste(img image.Image)
- func (tile *Image) Resize(width int) *Image
- func (tile *Image) Save(path string)
- func (tile *Image) Silhouette(foreground_any interface{}) *Image
- func (tile *Image) ToSVG() string
- func (tile *Image) Transparent() *Image
- func (tile *Image) Ukraine() *Image
- func (tile *Image) Zoom(zoom int) *Image
- type ImageComposite
- type Point
Constants ¶
View Source
const Version = "0.1.0-20220406"
Variables ¶
View Source
var ColorMap = map[string]color.RGBA{}/* 153 elements not displayed */
Functions ¶
func ConvertToNRGBA ¶
https://stackoverflow.com/questions/47535474/convert-image-from-image-ycbcr-to-image-rgba
Types ¶
type ColorInfo ¶
type ColorInfo struct { Count int // no. of pixels Index int // zero-based running index (0,1,2, etc.) }
todo/check: find a better name - why? why not?
type Image ¶
type Image struct {
*image.NRGBA // use "composition" - for "nicer" api (lets you use like image.Image) - why? why not?
}
func (*Image) Background ¶
func (*Image) Silhouette ¶
func (*Image) Transparent ¶
type ImageComposite ¶
type ImageComposite struct { Image // use "composition" - note: does NOT use image.Image but our own!!! TileWidth, TileHeight int Count int // optional - not all tiles (full cap(acity) might be used) }
func NewImageComposite ¶
func NewImageComposite(cols int, rows int, tileSize *image.Point) *ImageComposite
func ReadImageComposite ¶
func ReadImageComposite(path string, tileSize *image.Point) *ImageComposite
func (*ImageComposite) Add ¶
func (composite *ImageComposite) Add(tile image.Image)
func (*ImageComposite) Max ¶
func (composite *ImageComposite) Max() int
func (*ImageComposite) Strip ¶
func (composite *ImageComposite) Strip() *Image
func (*ImageComposite) Tile ¶
func (composite *ImageComposite) Tile(id int) *Image
Click to show internal directories.
Click to hide internal directories.