Beispiel #1
0
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
}
Beispiel #2
0
// @gist makeImageInfoUrl
func makeImageInfoUrl(imageUrl string) string {
	ii := fop.ImageInfo{}
	return ii.MakeRequest(imageUrl)
}