images

package
v0.1.0 Latest Latest
Warning

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

Go to latest
Published: Apr 9, 2015 License: MIT Imports: 16 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Optimize

func Optimize(f storage.File) (storage.File, error)

func Process

func Process(f storage.File, u *url.URL, noOpts bool) (storage.File, error)

Types

type GIF

type GIF struct {
	G *gif.GIF
}

func (*GIF) ApplyFilters

func (j *GIF) ApplyFilters(g *gift.GIFT, pb bool) error

func (*GIF) Encode

func (j *GIF) Encode() (io.ReadSeeker, error)

type ImsImage

type ImsImage interface {
	ApplyFilters(*gift.GIFT, bool) error
	Encode() (io.ReadSeeker, error)
}

func DecodeImage

func DecodeImage(f storage.File) (ImsImage, string, error)

DecodeImage reads a file from storage and attempts to decode it as an image.Image. We first attempt to autodetect the encoding and decode automatically, if this fails then we attempt to decode manually using a decoder based on the file extension.

type JPEG

type JPEG struct {
	I image.Image
}

func (*JPEG) ApplyFilters

func (j *JPEG) ApplyFilters(g *gift.GIFT, pb bool) error

func (*JPEG) Encode

func (j *JPEG) Encode() (io.ReadSeeker, error)

type PNG

type PNG struct {
	I image.Image
}

func (*PNG) ApplyFilters

func (j *PNG) ApplyFilters(g *gift.GIFT, pb bool) error

func (*PNG) Encode

func (j *PNG) Encode() (io.ReadSeeker, error)

Jump to

Keyboard shortcuts

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