Documentation ¶
Index ¶
Constants ¶
View Source
const ( JPEG = "jpeg" // jpeg/jpg PNG = "png" // png )
Variables ¶
This section is empty.
Functions ¶
func ContainsTransparent ¶ added in v1.20.1
ContainsTransparent judge png contains transparent
func GetFileContentType ¶ added in v1.20.1
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 NewFile ¶ added in v1.30.3
func NewFile(file *multipart.FileHeader, Name string) *File
NewFile file sugar
func (*File) ImageConfig ¶ added in v1.30.3
ImageConfig return Upload Image Config width/height
Click to show internal directories.
Click to hide internal directories.