Documentation ¶
Overview ¶
Copyright 2017 by GoSpider author. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.
Index ¶
- Variables
- func ChangeImageName(oldname string, newname string, force bool) (err error)
- func LoadImage(path string) (img image.Image, filetype string, err error)
- func RealImageName(filename string) (filerealname string, err error)
- func SaveImage(path string, img *image.RGBA, filetype string) (err error)
- func Scale(filename string, newdx int) (dst *image.RGBA, filetype string, err error)
- func ScaleF2F(filename string, savepath string, width int) (err error)
- func ThumbnailF2F(filename string, savepath string, width int, height int) (err error)
Constants ¶
This section is empty.
Variables ¶
Functions ¶
func ChangeImageName ¶
文件改名,如果force为假,且新的文件名已经存在,那么抛出错误 change a file's name,if force is False then if exist file thorw FileExistError
func LoadImage ¶
根据文件名打开图片,并编码,返回编码对象和文件类型 Load a image by a filename and return it's type,such as png
func RealImageName ¶
图像文件的真正名字 a image file real filename ,such as a tt.jpg may be a tt.png
Types ¶
This section is empty.