Skip to content
forked from gosexy/canvas

Image manipulation library based on ImageMagick's MagickWand, for Go.

License

Notifications You must be signed in to change notification settings

gotsunami/canvas

 
 

Repository files navigation

gosexy/canvas

gosexy/canvas is an image processing library for Go that uses ImageMagick's MagickWand as backend.

Build Status

Requeriments

ImageMagick's MagickWand development files are required.

# OSX
$ brew install imagemagick

# Arch Linux
$ sudo pacman -S extra/imagemagick

# Debian
$ 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()

  // Opening some image from disk.
  err := img.Open("examples/input/example.png")

  if err == nil {

    // Photo auto orientation based on EXIF tags.
    img.AutoOrientate()

    // Creating a squared thumbnail
    img.Thumbnail(100, 100)

    // Saving the thumbnail to disk.
    img.Write("examples/output/example-thumbnail.png")

  }
}

Documentation

See the online docs.

About

Image manipulation library based on ImageMagick's MagickWand, for Go.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • C 89.2%
  • Go 10.8%