Skip to content

yvasiyarov/canvas

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

66 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

gosexy/canvas

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

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()

  // 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

Read the gosexy/canvas documentation from a terminal

$ go doc github.com/gosexy/canvas

Alternatively, you can browse it online.

About

ImageMagick's MagickWand wrapper for Go.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • C 76.3%
  • C++ 14.9%
  • Go 8.5%
  • Objective-C 0.3%