Example #1
0
func getExif(imageUrl string) {

	var err error
	var ie = fop.Exif{}
	var exifRet fop.ExifRet

	// @gist getExif
	exifRet, err = ie.Call(nil, imageUrl)
	if err != nil {
		// 产生错误
		log.Println("fop getExif failed:", err)
		return
	}

	// 处理返回结果
	for _, item := range exifRet {
		log.Println(item.Type, item.Val)
	}
	// @endgist
}
Example #2
0
// @gist makeExifUrl
func makeExifUrl(imageUrl string) string {
	e := fop.Exif{}
	return e.MakeRequest(imageUrl)
}