image

package
v0.0.0-...-b2a5d9a Latest Latest
Warning

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

Go to latest
Published: Mar 15, 2016 License: MIT Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var Extensions = map[string]string{
	"image/jpeg": "jpg",
	"image/png":  "png",
	"image/bmp":  "bmp",
	"image/gif":  "gif",
}
View Source
var HeaderKeys = []string{
	"Age",
	"Content-Type",
	"Last-Modified",
	"Date",
	"Etag",
}

Functions

This section is empty.

Types

type ImageFile

type ImageFile struct {
	Source    []byte
	Processed []byte
	Key       string
	Headers   map[string]string
	Filepath  string
	Storage   gostorages.Storage
}

func FromStorage

func FromStorage(storage gostorages.Storage, filepath string) (*ImageFile, error)

func FromURL

func FromURL(u *url.URL) (*ImageFile, error)

func (*ImageFile) Content

func (i *ImageFile) Content() []byte

func (*ImageFile) ContentType

func (i *ImageFile) ContentType() string

func (*ImageFile) Filename

func (i *ImageFile) Filename() string

func (*ImageFile) FilenameExt

func (i *ImageFile) FilenameExt() string

func (*ImageFile) Format

func (i *ImageFile) Format() string

func (*ImageFile) Path

func (i *ImageFile) Path() string

func (*ImageFile) Save

func (i *ImageFile) Save() error

func (*ImageFile) URL

func (i *ImageFile) URL() string

Jump to

Keyboard shortcuts

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