mimg

package
v0.0.0-...-52c4d39 Latest Latest
Warning

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

Go to latest
Published: May 4, 2016 License: Apache-2.0 Imports: 11 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	DefaultLinuxFontFile = "/usr/share/fonts/truetype/freefont/FreeMono.ttf"
)

Functions

func ImageDrawRGBA

func ImageDrawRGBA(img *image.RGBA, imgcode image.Image, x, y int)

将图片绘制到图片

func ImageRGBA

func ImageRGBA(width, height int) *image.RGBA

ImageRGBA 按照分辨率创建一张空白图片对象

func OpenImage

func OpenImage(in io.Reader, ft FileType) (image.Image, error)

func OpenImageFile

func OpenImageFile(path string) (image.Image, error)

OpenImage open Image with file type

func OutWaterMark

func OutWaterMark(oldPic io.Reader, waterMark io.Reader, out io.Writer, ft FileType) error

WaterMark

func TextToImage

func TextToImage(text string, fontSize float64, fontFile string, fontColor color.Color) (image.Image, error)

func TextToImageFile

func TextToImageFile(text string, fontSize float64, fontFile string, fontColor color.Color, outFile string) error

func WaterMarkFile

func WaterMarkFile(inputFile, watermarkFile, newFile string) error

WaterMarkJpgFile

func WaterMarkImage

func WaterMarkImage(img image.Image, watermark image.Image) image.Image

func WriteImage

func WriteImage(img image.Image, ft FileType, out io.Writer) error

WriteImage

func WriteImageFile

func WriteImageFile(path string, img image.Image) error

WriteImage encode by file ext

Types

type FileType

type FileType int
const (
	UNKNOWN_TYPE FileType = iota
	JPEG
	PNG
)

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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