Skip to content

Brownymister/imgtext

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

21 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

go-imgtext

Simple Go package for adding Text to an Image

Install

go get github.com/Brownymister/imgtext

testing

go test ./... -cover

Exmaple

Simple example of creating a new image with an specified text.

    // init a new Image instance
    img := NewImage("./assets/image.jpg")
    // add Text to Image
	img.AddTextToImage("Im a Cat!", 112.5, 12, 30, "./assets/DancingScript-VariableFont_wght.ttf", color.Black)
    // save Image on drive
	img.Save("test.png")