legofy

package
v0.0.0-...-fc1ac91 Latest Latest
Warning

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

Go to latest
Published: May 16, 2019 License: MIT Imports: 13 Imported by: 0

Documentation

Overview

Package legofy provides legolized image of user-defined static images (PNG,JPG)

Index

Constants

View Source
const LEGOS string = `` /* 1248-byte string literal not displayed */

Color Mapping Source

Variables

This section is empty.

Functions

func LegofyImage

func LegofyImage(sourceImg image.Image, brickSize int, legoChan chan *LegoImage)

This method will legolize image from image.Image

func LegofyImagePath

func LegofyImagePath(imgSrc string, brickSize int, legoChan chan *LegoImage)

This method will legolize image from path

func SaveAsJPEG

func SaveAsJPEG(name string, img image.Image, quality int)

This method will save the resulting legolized image is JPEG format

func SaveAsPNG

func SaveAsPNG(name string, img image.Image, compresLvl png.CompressionLevel)

This method will save the resulting legolized image is PNG format

Types

type LegoImage

type LegoImage struct {
	Image      image.Image
	BrickCount int
}

LegoImage This struct contains the lego image and number of 1x1 lego bricks.

type Legofy

type Legofy struct {
}

Jump to

Keyboard shortcuts

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