Documentation ¶
Index ¶
- func BucketFiles(bucketName string) []string
- func BucketList() ([]string, error)
- func GetFile(w http.ResponseWriter, bucket, obj, compact, width, height string)
- func ImgCompress(img image.Image, width, height int, outType string) []byte
- func MakeBucket(bucketName string) error
- func UploadFile(bucket string, file multipart.File, fileStat *multipart.FileHeader) (string, error)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func BucketFiles ¶
func BucketList ¶
func GetFile ¶
func GetFile(w http.ResponseWriter, bucket, obj, compact, width, height string)
GetFile 请求文件的参数介绍 use : ?compact=5&width=500&height=500 compact 压缩等级; 优先级最高 width,height 指定图片宽高,必须都指定; 优先级第2高
func ImgCompress ¶
图片压缩,尺寸调整
Nearest-neighbor interpolation
NearestNeighbor InterpolationFunction = iota
Bilinear interpolation
Bilinear
Bicubic interpolation (with cubic hermite spline)
Bicubic
Mitchell-Netravali interpolation
MitchellNetravali
Lanczos interpolation (a=2)
Lanczos2
Lanczos interpolation (a=3)
Lanczos3
func MakeBucket ¶
func UploadFile ¶
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.