Skip to content

isbang/govips

 
 

Repository files navigation

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+ (8.8.1+ recommended for GIF, PDF, SVG, HEIC support)
  • C compatible compiler such as gcc 4.6+ or clang 3.0+
  • Go 1.11+

Installation

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

Example usage

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

// Resize an image with padding
return vips.Transform().
	PadStrategy(vips.ExtendBlack).
	Resize(1200, 1200).
	ApplyAndExport(image)

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

About

A fast and robust image library for Go built on libvips

Resources

License

Contributing

Stars

Watchers

Forks

Packages

No packages published

Languages

  • Go 51.6%
  • C 46.6%
  • HTML 1.3%
  • Other 0.5%