govips alternatives and similar packages
Based on the "Images" category.
Alternatively, view govips alternatives based on common mentions on social networks and blogs.
-
Primitive Pictures
Reproducing images with geometric primitives. -
imgproxy
Fast and secure standalone server for resizing and converting remote images -
imaginary
Fast, simple, scalable, Docker-ready HTTP microservice for high-level image processing -
pigo
Fast face detection, pupil/eyes localization and facial landmark points detection library in pure Go. -
bimg
Go package for fast high-level image processing powered by libvips C library -
gowitness
๐ gowitness - a golang, web screenshot utility using Chrome Headless -
stegify
๐ Go tool for LSB steganography, capable of hiding any file within an image. -
canvas
Cairo in Go: vector to raster, SVG, PDF, EPS, WASM, OpenGL, Gio, etc. -
geopattern
:triangular_ruler: Create beautiful generative image patterns from a string in golang. -
Angular 2 Image Gallery
Image Gallery built with Angular 15+, node.js and GraphicsMagick -
darkroom
An image proxy with changeable storage backends and image processing engines with focus on speed and resiliency. -
steganography
Pure Golang Library that allows LSB steganography on images using ZERO dependencies -
mergi
go library for image programming (merge, crop, resize, watermark, animate, ease, transit) -
fastimage
Finds the type and/or size of a remote image given its uri, by fetching as little as needed. -
LookUp
:mag: Pure Go implementation of fast image search and simple OCR, focused on reading info from screenshots -
webp-server
Simple and minimal image server capable of storing, resizing, converting and caching images. -
color-extractor
Simple image color extractor written in Go with no external dependencies -
goimghdr
The imghdr module determines the type of image contained in a file for go -
scout
Scout is a standalone open source software solution for DIY video security.
Clean code begins in your IDE with SonarLint
Do you think we are missing an alternative of govips or a related project?
Popular Comparisons
README
govips
A lightning fast image processing and resizing 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.
Libvips is generally 4-8x faster than other graphics processors such as GraphicsMagick and ImageMagick. Check the benchmark: 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.
Requirements
- libvips 8.10+
- C compatible compiler such as gcc 4.6+ or clang 3.0+
- Go 1.14+
Dependencies
MacOS
Use homebrew to install vips and pkg-config:
brew install vips pkg-config
Ubuntu
You need a recent libvips to work with govips. New govips functionality is continuously added which takes advantage of new libvips functionality. Groovy (20.10) and Hirsute (21.04) repositories have working versions. However on Focal (20.04), you need to install libvips and dependencies from a backports repository:
sudo add-apt-repository -y ppa:strukturag/libde265
sudo add-apt-repository -y ppa:strukturag/libheif
sudo add-apt-repository ppa:tonimelisma/ppa
Then:
sudo apt -y install libvips-dev
Windows
The recommended approach on Windows is to use Govips via WSL and Ubuntu.
If you need to run Govips natively on Windows, it's not difficult but will require some effort. We don't have a recommended environment or setup at the moment. Windows is also not in our list of CI/CD targets so Govips is not regularly tested for compatibility. If you would be willing to setup and maintain a robust CI/CD Windows environment, please open a PR, we would be pleased to accept your contribution and support Windows as a platform.
Installation
go get -u github.com/davidbyttow/govips/v2/vips
MacOS note
On MacOS, govips may not compile without first setting an environment variable:
export CGO_CFLAGS_ALLOW="-Xpreprocessor"
Example usage
package main
import (
"fmt"
"io/ioutil"
"os"
"github.com/davidbyttow/govips/v2/vips"
)
func checkError(err error) {
if err != nil {
fmt.Println("error:", err)
os.Exit(1)
}
}
func main() {
vips.Startup(nil)
defer vips.Shutdown()
image1, err := vips.NewImageFromFile("input.jpg")
checkError(err)
// Rotate the picture upright and reset EXIF orientation tag
err = image1.AutoRotate()
checkError(err)
ep := vips.NewDefaultJPEGExportParams()
image1bytes, _, err := image1.Export(ep)
err = ioutil.WriteFile("output.jpg", image1bytes, 0644)
checkError(err)
}
See examples/ folder for more examples.
Running tests
$ make test
Memory usage note
MALLOC_ARENA_MAX
libvips
uses GLib for memory management, and it brings GLib memory fragmentation
issues to heavily multi-threaded programs. First thing you can try if you noticed
constantly growing RSS usage without Go's sys memory growth is set MALLOC_ARENA_MAX
:
MALLOC_ARENA_MAX=2 application
This will reduce GLib memory appetites by reducing the number of malloc arenas that it can create. By default GLib creates one are per thread, and this would follow to a memory fragmentation.
Contributing
Feel free to file issues or create pull requests. See this guide on contributing for more information.
Credits
Thanks to:
- John Cupitt for creating and maintaining libvips
- Toni Melisma for pushing to a 2.x release
- wix.com for the govips logo and lots of great functionality
- All of our fantastic contributors
License
MIT
*Note that all licence references and agreements mentioned in the govips README section above
are relevant to that project's source code only.