Open Source High-Level Image Processing Go library

Go API that allows images rotation, Fit images, image thumbnails creation, zoom the image, embed or extend an image, add blur effects to an image, and much more.

bimg is an open source high-level image processing Go library that provides the capability for reading and manipulating images with just a couple lines of Go code.  The library is smaller in size but produces very well-organized and efficient results. The library is very fast as compare to other available libraries that require very small memory to complete the task.

The bimg is a high-level C library that is built on top of the libvips which is a very powerful library for processing images. It provides support for reading some very popular image file formats like JPEG, PNG, WEBP, TIFF, PDF, GIF, and SVG, etc. You can also easily export images to JPEG, PNG, WEBP formats as well as to transparent images. 

The bimg library has included support for several important image processing features such as resizing images, enlarge the image,  image cropping including smart crop support, flip or rotate images, create image thumbnails, image zooming support, add watermark and Gaussian blur effect, extract specific area from an image, trim images, image conversion to other formats and many more.

Previous Next

Getting Started with bimg

The easiest and recommend way to install bimg is via GitHub.

Install bimg via GitHub

 go get -u gopkg.in/h2non/bimg.v1

Image Conversion to Other Formats via Go

The open source bimg library enables software developers to programmatically convert images to other supported file formats with just couple of lines of Go code. Let’s suppose you have an in JPEG format and you want to convert it to PNG. You need to provide image information like image name, address, and conversion format. The image will be successfully converted to the suggested format with ease.

Crop or Resize Images

The free bimg library gives software developers the capability to resize as well as crop their images inside their own Go applications. You need to provide the width and height of the new image and location as well.  It also supports forcing resize operation without preserving the aspect ratio. You can also add text and extract the area of your choice from an image. Crop crops the image to the exact size specified.

Adding Watermarks to Images

The bimg API has included functionality for adding watermark to image inside Go applications with ease. Adding Watermark is a very useful feature for protecting your images. Watermarking is the easiest and very useful way for protecting your photos on the internet. You can easily place a logo or text watermark. The library helps you to programmatically add watermark to your image on any selected position as well as the opacity.

Flip and Rotate Images

The open source bimg library gives software developers the capability to rotate their images according to their needs using Go language commands. There is a method for automatic image rotation. The AutoRotate function automatically rotates the image with no additional transformation based on the EXIF orientation metadata, if available. It also provides support for flip or flop images, image Interpretation, image length, image metadata and many more.