Skip to content
Image manipulation library based on ImageMagick's MagickWand, for Go.
Branch: master
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
_examples
_include
.gitignore
.travis.yml
LICENSE
README.md
canvas.go
canvas_test.go
constants.go
pixel.go
pixel_iterator.go
text.go

README.md

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.

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.

Authors

You can’t perform that action at this time.
You signed in with another tab or window. Reload to refresh your session. You signed out in another tab or window. Reload to refresh your session.