core

package
v0.0.0-...-d5d49ed Latest Latest
Warning

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

Go to latest
Published: Aug 22, 2016 License: GPL-2.0 Imports: 15 Imported by: 6

Documentation

Index

Constants

View Source
const Count int = 6

Variables

This section is empty.

Functions

func CropToSquare

func CropToSquare(img image.Image) image.Image

CropToSquare crop image so it be square

func GenerateCollage

func GenerateCollage(images []image.Image, height int, width int) image.Image

GenerateCollage make big image from the input images. Height and Width is the amount of image tiles. If height = 2 and width = 3 then collage image will be 1280x1920px

func IsSquare

func IsSquare(image image.Image) bool

IsSquare checks if image is real square or with white/black frame. TODO: it's quite stupid algorythm, but toss away 95% of bad pics

func Resize

func Resize(img image.Image, width uint) image.Image

Resize image to sizes

Types

type SearchApi

type SearchApi struct {
	Count int
	// contains filtered or unexported fields
}

func NewSearchApi

func NewSearchApi(clientId string, httpClient *http.Client) (s *SearchApi)

func (*SearchApi) SearchByLocation

func (self *SearchApi) SearchByLocation(lat float64, lng float64) []image.Image

func (*SearchApi) SearchByName

func (self *SearchApi) SearchByName(userName string) []image.Image

func (*SearchApi) SearchByTag

func (self *SearchApi) SearchByTag(tag string) []image.Image

Jump to

Keyboard shortcuts

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