Esempio n. 1
0
//6.1.1 query image attribute
func imageAttr2() {
	var imageUrl = "http://needkane.qiniudn.com/kane2.jpg"
	ii := fop.ImageInfo{}
	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)
}
Esempio n. 2
0
File: fop.go Progetto: kuguobing/api
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
}
Esempio n. 3
0
File: fop.go Progetto: kuguobing/api
// @gist makeImageInfoUrl
func makeImageInfoUrl(imageUrl string) string {
	ii := fop.ImageInfo{}
	return ii.MakeRequest(imageUrl)
}