Versions in this module Expand all Collapse all v0 v0.6.0 Aug 27, 2026 Changes in this version + var NativeGeometry = Geometry + func RecognizeScreen(s *Screen) ([]string, error) + func RecognizeText(img image.Image, geom Geometry) ([]string, error) + type Geometry struct + OriginX int + OriginY int + Scale int v0.5.0 Jun 30, 2026 Changes in this version + const Black + const Blue + const CellSize + const Cols + const Cyan + const FileLen + const Green + const Height + const Magenta + const Red + const Rows + const White + const Width + const Yellow + func ApplyMask(a, mask *Asset) error + func AssetToImage(a *Asset, ink, paper color.Color, paperTransparent bool) *image.RGBA + func Crop(src image.Image, r Rect) (*image.RGBA, error) + func DecodeImage(r io.Reader) (image.Image, error) + func Encode(s *Screen) []byte + func EncodeCollection(c *Collection) ([]byte, error) + func Fit(src image.Image, mode ResizeMode, fill color.Color) (image.Image, error) + func ParseBool(s string) (bool, error) + func ParseColour(s string) (uint8, error) + func Paste(s *Screen, a *Asset, x, y int, op PasteOp) error + func ToImage(s *Screen) *image.RGBA + func ToImageBitmap(s *Screen, bits int, ink, paper color.Color, paperTransparent bool) *image.RGBA + type Asset struct + Attr [][]Attribute + Height int + Ink [][]bool + IsMask bool + Name string + Width int + func CutCells(s *Screen, cx, cy, cw, ch int, name string, keepAttrs bool) (*Asset, error) + func CutRegion(s *Screen, r Rect, name string, keepAttrs bool) (*Asset, error) + func (a *Asset) HasAttrs() bool + func (a *Asset) MapAttributes(f func(Attribute) Attribute) + type Attribute struct + Bright bool + Flash bool + Ink uint8 + Paper uint8 + func AttributeFromByte(b byte) Attribute + func ParseAttribute(s string) (Attribute, error) + func (a Attribute) Byte() byte + func (a Attribute) InkRGBA() color.RGBA + func (a Attribute) PaperRGBA() color.RGBA + func (a Attribute) String() string + type Collection struct + Assets []Asset + func DecodeCollection(data []byte) (*Collection, error) + func (c *Collection) Find(name string) *Asset + type PasteOp int + const PasteAND + const PasteCOPY + const PasteOR + const PasteXOR + type Rect struct + H int + W int + X int + Y int + func AutoExtent(src image.Image, bg color.Color, tol int) (Rect, error) + func BitmapExtent(s *Screen, bits int) (Rect, error) + func CellRect(cx, cy, cw, ch int) Rect + type ResizeMode int + const ResizeBestFit + const ResizeCentre + const ResizeNone + const ResizeStretch + type Screen struct + Attr [Rows][Cols]Attribute + Ink [Height][Width]bool + func Decode(data []byte) (*Screen, error) + func FromImage(img image.Image) (*Screen, error) + type SizeError struct + Got image.Point + func (e *SizeError) Error() string