gosexy/canvas
This project is currently unmaintained and just kept for historical purposes,
if you're looking for a better alternative take a look at
imagick.
gosexy/canvas
is an image processing library for Go that uses ImageMagick's
MagickWand as backend.
Requeriments
ImageMagick's MagickWand development files are required.
$ brew install imagemagick
$ sudo pacman -S extra/imagemagick
$ sudo aptitude install libmagickwand-dev
Installation
Just pull gosexy/canvas
from github using go get
:
$ go get github.com/gosexy/canvas
Usage
package main
import "github.com/gosexy/canvas"
func main() {
img := canvas.New()
defer img.Destroy()
err := img.Open("examples/input/example.png")
if err == nil {
img.AutoOrientate()
img.Thumbnail(100, 100)
img.Write("examples/output/example-thumbnail.png")
}
}
Documentation
See the online docs.
Authors