Documentation ¶
Index ¶
- Variables
- type Backend
- type Gifsicle
- func (b *Gifsicle) Effect(ctx context.Context, img *image.ImageFile, options *Options) ([]byte, error)
- func (b *Gifsicle) Fit(ctx context.Context, img *image.ImageFile, options *Options) ([]byte, error)
- func (b *Gifsicle) Flat(ctx context.Context, img *image.ImageFile, options *Options) ([]byte, error)
- func (b *Gifsicle) Flip(ctx context.Context, img *image.ImageFile, options *Options) ([]byte, error)
- func (b *Gifsicle) Resize(ctx context.Context, imgfile *image.ImageFile, opts *Options) ([]byte, error)
- func (b *Gifsicle) Rotate(ctx context.Context, img *image.ImageFile, options *Options) ([]byte, error)
- func (b *Gifsicle) String() string
- func (b *Gifsicle) Thumbnail(ctx context.Context, imgfile *image.ImageFile, opts *Options) ([]byte, error)
- type GoImage
- func (e *GoImage) Effect(ctx context.Context, img *imagefile.ImageFile, options *Options) ([]byte, error)
- func (e *GoImage) Fit(ctx context.Context, img *imagefile.ImageFile, options *Options) ([]byte, error)
- func (e *GoImage) Flat(ctx context.Context, backgroundFile *imagefile.ImageFile, options *Options) ([]byte, error)
- func (e *GoImage) Flip(ctx context.Context, img *imagefile.ImageFile, options *Options) ([]byte, error)
- func (e *GoImage) Resize(ctx context.Context, img *imagefile.ImageFile, options *Options) ([]byte, error)
- func (e *GoImage) Rotate(ctx context.Context, img *imagefile.ImageFile, options *Options) ([]byte, error)
- func (e *GoImage) String() string
- func (e *GoImage) Thumbnail(ctx context.Context, img *imagefile.ImageFile, options *Options) ([]byte, error)
- type Options
Constants ¶
This section is empty.
Variables ¶
View Source
var MethodNotImplementedError = errors.New("Not implemented")
MethodNotImplementedError is an error returned if method is not implemented
Functions ¶
This section is empty.
Types ¶
type Backend ¶
type Backend interface { Effect(ctx context.Context, img *image.ImageFile, options *Options) ([]byte, error) Fit(ctx context.Context, img *image.ImageFile, options *Options) ([]byte, error) Flat(ctx context.Context, background *image.ImageFile, options *Options) ([]byte, error) Flip(ctx context.Context, img *image.ImageFile, options *Options) ([]byte, error) Resize(ctx context.Context, img *image.ImageFile, options *Options) ([]byte, error) Rotate(ctx context.Context, img *image.ImageFile, options *Options) ([]byte, error) String() string Thumbnail(ctx context.Context, img *image.ImageFile, options *Options) ([]byte, error) }
Engine is an interface to define an image engine
type Gifsicle ¶
type Gifsicle struct {
Path string
}
Gifsicle is the gifsicle backend.
func (*Gifsicle) Effect ¶
func (b *Gifsicle) Effect(ctx context.Context, img *image.ImageFile, options *Options) ([]byte, error)
Effect implements Backend.
func (*Gifsicle) Flat ¶
func (b *Gifsicle) Flat(ctx context.Context, img *image.ImageFile, options *Options) ([]byte, error)
Flat implements Backend.
func (*Gifsicle) Flip ¶
func (b *Gifsicle) Flip(ctx context.Context, img *image.ImageFile, options *Options) ([]byte, error)
Flip implements Backend.
func (*Gifsicle) Resize ¶
func (b *Gifsicle) Resize(ctx context.Context, imgfile *image.ImageFile, opts *Options) ([]byte, error)
Resize implements Backend.
Click to show internal directories.
Click to hide internal directories.