示例#1
0
文件: fop.go 项目: arkfang/qshell
func getImageInfo(imageUrl string) {

	var err error
	var ii = fop.ImageInfo{}
	var infoRet fop.ImageInfoRet

	// @gist getImageInfo
	infoRet, err = ii.Call(nil, imageUrl)
	if err != nil {
		// 产生错误
		log.Println("fop getImageInfo failed:", err)
		return
	}
	log.Println(infoRet.Height, infoRet.Width, infoRet.ColorModel,
		infoRet.Format)
	// @endgist
}
示例#2
0
文件: fop.go 项目: arkfang/qshell
// @gist makeImageInfoUrl
func makeImageInfoUrl(imageUrl string) string {
	ii := fop.ImageInfo{}
	return ii.MakeRequest(imageUrl)
}