image

package
v0.1.0 Latest Latest
Warning

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

Go to latest
Published: May 5, 2019 License: MPL-2.0 Imports: 12 Imported by: 0

Documentation

Index

Constants

View Source
const (

	// MediaTypeJpeg is the mime type for jpeg images
	MediaTypeJpeg = "image/jpeg"
	// MediaTypePng is the mime type for png images
	MediaTypePng = "image/png"
	// MediaTypeGif is the mime type for gif images
	MediaTypeGif = "image/gif"
)

Variables

This section is empty.

Functions

This section is empty.

Types

type Image

type Image interface {
	LoadJpeg(formField string, opt Options) echo.MiddlewareFunc
}

Image is a service for managing image uploads

func New

func New(conf governor.Config, l governor.Logger) Image

New returns a new image service

type Options

type Options struct {
	Width          int
	Height         int
	ThumbWidth     int
	ThumbHeight    int
	Quality        int
	ThumbQuality   int
	Crop           bool
	ContextField   string
	SizeField      string
	ThumbnailField string
}

Options represent the image options of the loaded image

Jump to

Keyboard shortcuts

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