Skip to content

A fast and robust image library for Go built on libvips

License

Notifications You must be signed in to change notification settings

jhford-scout24/govips

 
 

Repository files navigation

govips Build Status GoDoc Go Report Card 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. Additionally, it exposes raw access to call operations directly, for forward compatibility.

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

This library was inspired primarily based on the C++ wrapper in libvips.

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.

Supported image operations

This library supports all known operations available to libvips found here:

Requirements

  • libvips 8+ (8.5.8+ recommended for GIF, PDF, SVG support)
  • C compatible compiler such as gcc 4.6+ or clang 3.0+
  • Go 1.9+

Installation

go get -u github.com/davidbyttow/govips/pkg/vips

Example usage

// Resize an image with padding
return vips.NewPipeline().
	LoadFile(inputFile).
	PadStrategy(vips.ExtendBlack).
	Resize(1200, 1200).
	OutputFile(outputFile)

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

Stars

Watchers

Forks

Packages

No packages published

Languages

  • Go 89.5%
  • C 6.3%
  • Python 3.7%
  • Shell 0.5%