Documentation ¶
Index ¶
- Variables
- func Finalize()
- func Initialize()
- type ImageMagickEngine
- func (e *ImageMagickEngine) Close()
- func (e *ImageMagickEngine) Crop(width int, height int, startX int, startY int) error
- func (e *ImageMagickEngine) Generate() ([]byte, error)
- func (e *ImageMagickEngine) GetImageHeight() int
- func (e *ImageMagickEngine) GetImageWidth() int
- func (e *ImageMagickEngine) Open() error
- func (e *ImageMagickEngine) RemoveAlpha() error
- func (e *ImageMagickEngine) Resize(width int, height int) error
- func (e *ImageMagickEngine) SetCompressionQuality(quality int)
- func (e *ImageMagickEngine) SetFormat(format string)
- func (e *ImageMagickEngine) SetSizeHint(width int, height int)
- type ResizeEngine
Constants ¶
This section is empty.
Variables ¶
View Source
var ( AvailableEngines = []string{"ImageMagick"} ErrUnknownResizeEngine = errors.New("specify unknown resize engine.") )
Functions ¶
func Initialize ¶
func Initialize()
Types ¶
type ImageMagickEngine ¶
type ImageMagickEngine struct { ResizeEngine // contains filtered or unexported fields }
func (*ImageMagickEngine) Close ¶
func (e *ImageMagickEngine) Close()
func (*ImageMagickEngine) Generate ¶
func (e *ImageMagickEngine) Generate() ([]byte, error)
func (*ImageMagickEngine) GetImageHeight ¶
func (e *ImageMagickEngine) GetImageHeight() int
func (*ImageMagickEngine) GetImageWidth ¶
func (e *ImageMagickEngine) GetImageWidth() int
func (*ImageMagickEngine) Open ¶
func (e *ImageMagickEngine) Open() error
func (*ImageMagickEngine) RemoveAlpha ¶
func (e *ImageMagickEngine) RemoveAlpha() error
func (*ImageMagickEngine) SetCompressionQuality ¶
func (e *ImageMagickEngine) SetCompressionQuality(quality int)
func (*ImageMagickEngine) SetFormat ¶
func (e *ImageMagickEngine) SetFormat(format string)
func (*ImageMagickEngine) SetSizeHint ¶
func (e *ImageMagickEngine) SetSizeHint(width int, height int)
type ResizeEngine ¶
type ResizeEngine interface { Open() error Close() SetSizeHint(width, height int) SetFormat(format string) SetCompressionQuality(quality int) GetImageHeight() int GetImageWidth() int RemoveAlpha() error Resize(width int, height int) error Crop(width int, height int, startX int, startY int) error Generate() ([]byte, error) }
func New ¶
func New(image []byte) (ResizeEngine, error)
Click to show internal directories.
Click to hide internal directories.