imageProcess

package
v0.0.0-...-4813819 Latest Latest
Warning

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

Go to latest
Published: Jul 7, 2019 License: MIT Imports: 14 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func AddHorizontalLabel

func AddHorizontalLabel(img *image.RGBA, leftX, bottomY int, label, fontPath string, fontSize float64, fontColor color.Color) error

横書きの文字を入れる

func AddVerticalBottomAlignLabel

func AddVerticalBottomAlignLabel(img *image.RGBA, leftX int, label, fontPath string, fontSize float64, fontColor color.Color, marginPx int) error

func AddVerticalCenterAlignLabel

func AddVerticalCenterAlignLabel(img *image.RGBA, leftX int, label, fontPath string, fontSize float64, fontColor color.Color, marginPx int) error

func AddVerticalLabel

func AddVerticalLabel(img *image.RGBA, leftX, topY int, label, fontPath string, fontSize float64, fontColor color.Color) error

縦書きの文字を入れる

func AddVerticalTopAlignLabel

func AddVerticalTopAlignLabel(img *image.RGBA, leftX int, label, fontPath string, fontSize float64, fontColor color.Color, marginPx int) error

func GetSize

func GetSize(img *image.RGBA) image.Point

func HLine

func HLine(img *image.RGBA, x1, y, x2 int, col color.Color)

HLine draws a horizontal line

func ImageBase64Encode

func ImageBase64Encode(img *image.RGBA) string

画像をbase64へ変換

func ImageFileBase64Encode

func ImageFileBase64Encode(filePath string) string

画像ファイルをbase64へ変換

func NewImage

func NewImage(width int, height int, backgroundColor color.Color) *image.RGBA

新規画像作成

func NewUniqueFileName

func NewUniqueFileName(extension string) string

ランダムなファイル名を生成

func PasteImage

func PasteImage(img *image.RGBA, imageWidth, imageHeight, leftX, topY int, imagePath string) error

画像を貼り付け

func Rect

func Rect(img *image.RGBA, x1, y1, x2, y2, thicknessPx int, col color.Color)

Rect draws a rectangle utilizing HLine() and VLine()

func Resize

func Resize(img *image.Image, toWidth, toHeight int)

画像をリサイズ

func SaveImage

func SaveImage(img *image.RGBA, filePath string) error

画像を保存

func SetBackgroundColor

func SetBackgroundColor(img *image.RGBA, color image.Image)

背景色を追加

func VLine

func VLine(img *image.RGBA, x, y1, y2 int, col color.Color)

VLine draws a veritcal line

Types

This section is empty.

Jump to

Keyboard shortcuts

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