image

package
v0.1.10 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jan 23, 2024 License: MIT Imports: 20 Imported by: 0

Documentation

Overview

Package image provides a simple interface for loading images from ./assets/images and mods and converting them to ansi strings.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func AddSearchPaths

func AddSearchPaths(paths ...string)

AddSearchPaths adds additional search paths for images.

func Fetch

func Fetch(name string, options ...Option) (string, error)

Fetch fetches an image from ./assets/images and converts it to an ansi string.

env EOE_IMG_SIMPLE = 1: Forces the usage of a simpler character set. Can be used for stock cmd on windows.

func FetchAnimation

func FetchAnimation(name string, options ...Option) ([]string, error)

FetchAnimation fetches an animated gif from ./assets/images and converts it to ansi strings for each frame.

env EOE_IMG_SIMPLE = 1: Forces the usage of a simpler character set. Can be used for stock cmd on windows.

func ResetSearchPaths

func ResetSearchPaths()

ResetSearchPaths resets the search paths to the default.

Types

type Option

type Option func(options *Options) imeji.Option

func WithMaxWidth

func WithMaxWidth(maxWidth int) Option

func WithResize

func WithResize(width int, height int) Option

type Options

type Options struct {
	// contains filtered or unexported fields
}

func (Options) String

func (o Options) String() string

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL