Documentation
¶
Index ¶
- Variables
- type Config
- type FileInfo
- func (f *FileInfo) ChangeToSmall(path string) string
- func (f *FileInfo) CheckSource() bool
- func (f *FileInfo) CreatePicClip(path string, w, h, q int) error
- func (f *FileInfo) CreatePicScale(path string, w, h, q int) error
- func (f *FileInfo) GetFrame(mediaPath string) (string, error)
- func (f *FileInfo) JoinInfo() (path string)
- func (f *FileInfo) ParseMediaExt(fileName string)
- func (f *FileInfo) RemoveLastSource(lastSrc string, small ...bool)
- func (f *FileInfo) RetMaxWH(max int) (int, int)
- func (f *FileInfo) RetRealWHEXT() (int, int)
- func (f *FileInfo) SaveImage(path string) (err error)
- func (f *FileInfo) ValidateSize() (err error)
- func (f *FileInfo) ValidateType() (err error)
- type Sizer
Constants ¶
This section is empty.
Variables ¶
Functions ¶
This section is empty.
Types ¶
type FileInfo ¶
type FileInfo struct {
Config *Config `json:"-"`
Image image.Image `json:"-"`
Size int64 `json:"-"`
FileType string `json:"-"`
Name string `json:"name"`
URL string `json:"url"`
ScreenShotURL string `json:"screen_shot_url"`
DialogID string `json:"dialog_id"`
Success int `json:"success"`
Message string `json:"message"`
}
func NewFileInfo ¶
func (*FileInfo) ChangeToSmall ¶
func (*FileInfo) CheckSource ¶
func (*FileInfo) CreatePicClip ¶
* 图片裁剪 * 入参:1、file,2、输出路径,3、原图width,4、原图height,5、精度 * 规则:照片生成缩略图尺寸为w * h,先进行缩小,再进行平均裁剪 * * 返回:error
func (*FileInfo) CreatePicScale ¶
* 缩略图生成 * 入参:1、file,2、输出路径,3、输出width,4、输出height,5、精度 * 规则: width,height是想要生成的尺寸 * * 返回:error
func (*FileInfo) ParseMediaExt ¶
func (*FileInfo) RemoveLastSource ¶
func (*FileInfo) RetRealWHEXT ¶
func (*FileInfo) ValidateSize ¶
func (*FileInfo) ValidateType ¶
Click to show internal directories.
Click to hide internal directories.