image

package
v0.1.0 Latest Latest
Warning

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

Go to latest
Published: Jul 22, 2018 License: MIT Imports: 10 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	// Path upload directory
	Path = "./upload/cache/"
)

Functions

func Resize

func Resize(path string, width, height uint) (newPath string, err error)

Resize creates a scaled image with new dimensions If either width or height is set to 0, it will be set to an aspect ratio preserving value

func Thumbnail

func Thumbnail(path string, width, height uint) (newPath string, err error)

Thumbnail downscales an image preserving its aspect ratio to the maximum dimensions

It will return the original image if original sizes are smaller than the provided dimensions.

Types

This section is empty.

Jump to

Keyboard shortcuts

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