ioimage

package
v3.0.8 Latest Latest
Warning

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

Go to latest
Published: Mar 10, 2022 License: MIT Imports: 21 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ReadFace

func ReadFace(fontPath string, fontIndex int, fontSize float64) (font.Face, error)

ReadFace はfontPathのフォントファイルからfaceを返す。

func Write

func Write(w io.Writer, imgExt string, texts []string, conf WriteConfig) error

Write はテキストのEscapeSequenceから色情報などを読み取り、 wに書き込む。

Types

type WriteConfig

type WriteConfig struct {
	Foreground    escseq.RGBA // 文字色
	Background    escseq.RGBA // 背景色
	FontFace      font.Face   // フォントファイル
	EmojiFontFace font.Face   // 絵文字用のフォントファイル
	EmojiDir      string      // 絵文字画像ファイルの存在するディレクトリ
	UseEmojiFont  bool        // 絵文字TTFを使う
	FontSize      int         // フォントサイズ
	UseAnimation  bool        // アニメーションGIFを生成する
	Delay         int         // アニメーションのディレイ時間
	LineCount     int         // 入力データのうち何行を1フレーム画像に使うか
	ToSlackIcon   bool        // Slackのアイコンサイズにする
	ResizeWidth   int         // 画像の横幅
	ResizeHeight  int         // 画像の縦幅
}

Jump to

Keyboard shortcuts

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