gorainbowcollage

package module
v0.0.0-...-44abea1 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Oct 4, 2020 License: MIT Imports: 6 Imported by: 0

README

go-rainbow-collage - Create Colour Sorted Collages

go-rainbow-collage lets you create colour sorted collages from an array of images. This code was originally part of a personal project and I decided to make it open source in case anyone finds it useful.

Installation

go get -u github.com/conorbros/go-rainbow-collage

Usage

Import the library and supply an array of images and desired x/y dimensions of the collage.

import collage "github.com/conorbros/go-rainbow-collage"

// arguments require an array of images
images := make([]*image.Image, 100)

collage, _ := collage.New(images, 10, 10)

// do something with the output
outputImage, _ := os.Create("output.jpeg")

jpeg.Encode(outputImage, collage, &jpeg.Options{Quality: 80})

Examples

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func New

func New(images []*image.Image, x int, y int) (*image.RGBA, error)

New creates a collage from the array of images supplied and with the x/y dimensions specified

Types

This section is empty.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL