graphics

package
v0.0.0-...-40cb7ec Latest Latest
Warning

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

Go to latest
Published: Nov 16, 2020 License: MIT Imports: 6 Imported by: 1

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ReadImage

func ReadImage(img []byte) (image.Image, error)

ReadImage converts bytes to image. Supports webp.

func ResizeLimit

func ResizeLimit(img []byte, limit float64, quality int) (*bytes.Buffer, error)

ResizeLimit resizes the image if it's long side bigger than limit. Use default limit 900 if limit is set to zero. Use default quality 85 if quality is set to zero.

func Thumbnail

func Thumbnail(img []byte, size, quality int) (*bytes.Buffer, error)

Thumbnail create a thumbnail of imgFile. Use default size(128) if size is set to zero. Use default quality(85) if quality is set to zero.

Types

This section is empty.

Jump to

Keyboard shortcuts

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