Documentation
¶
Index ¶
- Constants
- func GetRid(ver, appID, hash string) string
- func HashToRid(appID, hash string) string
- func IdToRid(appID, id string) string
- func MMHash(buf []byte) uint64
- func ResizeBytesImgToBytes(srcBytes []byte, filename string, width, height int, enlargeSmaller bool, ...) (imgBytes []byte, err error)
- func ResizeFileToFile(src string, dst string, width int, height int, enlargeSmaller bool, ...) error
- func ResizeImg(srcImg image.Image, width, height int, enlargeSmaller bool) (newImg image.Image)
- func ResizeImgToBytes(srcImg image.Image, filename string, width, height int, enlargeSmaller bool, ...) (imgBytes []byte, err error)
- func ResizeSmaller(srcWidth, srcHeight, width, height int) (newWidth int, newHeight int)
- type CropParams
- type Size
Constants ¶
View Source
const (
ErrHashInvalid string = "ERR_HASH_INVALID"
)
Variables ¶
This section is empty.
Functions ¶
func ResizeBytesImgToBytes ¶
func ResizeFileToFile ¶
func ResizeImgToBytes ¶
func ResizeSmaller ¶
* src size: 160x90 input size: 200x300, output: 60x90 input size: 200x100, output: 160x80 *
Types ¶
type CropParams ¶
func ParseImageProcessParams ¶
func ParseImageProcessParams(imageProcess string) (quality int, crop *CropParams)
ParseImageProcessParams 解析参数. resize,fw_300,fh_200/quality,q_80
Click to show internal directories.
Click to hide internal directories.