Documentation ¶
Index ¶
Constants ¶
View Source
const ( JPEG = "jpeg" // jpeg/jpg PNG = "png" // png )
Variables ¶
This section is empty.
Functions ¶
func ContainsTransparent ¶
ContainsTransparent judge png contains transparent
func GetFileContentType ¶ added in v1.30.34
GetFileContentType must a file file byte data[:512] image type: "image/jpeg","image/png"
Types ¶
type File ¶
type File struct { File *multipart.FileHeader // file name Name string // path Path string NewPath string // img attributes Width int Height int // format 2006-01-02 15:04:05 Format string // is img compress // default false, no compress IsComp bool Quality int // default 80, 1-100 // content type ContentType string }
File upload
func (*File) ImageConfig ¶
ImageConfig return Upload Image Config width/height
Click to show internal directories.
Click to hide internal directories.