/govips

A fast and robust image library for Go built on libvips

Primary LanguageGoMIT LicenseMIT

govips License

A libvips library for Go

This package wraps the core functionality of libvips image processing library by exposing all image operations on first-class types in Go.

How fast is libvips? See this: Speed and Memory Use

The intent for this is to enable developers to build extremely fast image processors in Go, which is suited well for concurrent requests.

Libvips is generally 4-8x faster than other graphics processors such as GraphicsMagick and ImageMagick.

Requirements

  • libvips 8.10+
  • C compatible compiler such as gcc 4.6+ or clang 3.0+
  • Go 1.14+

Installation

go get -u github.com/wix-playground/govips/vips

Example usage

package main

import (
	"github.com/wix-playground/govips/vips"
)

image, err := NewImageFromFile("image.jpg")
if err != nil {
	return nil, err
}
defer image.Close()

// Resize an image
return image.Resize(1200, 1200).Export(nil)

Contributing

In short, feel free to file issues or send along pull requests. See this guide on contributing for more information.

Credits

Thank you to John Cupitt for maintaining libvips and providing feedback on vips.

License

MIT - David Byttow