閱讀162 返回首頁    go 網易 go 網易蜂巢


富媒體信息

目錄

獲取圖片基本信息

描述

獲取圖片基本信息,如圖片類型(jpg,png等)、圖片寬度(Width)和高度(Height)等。

接口

GET /${ObjectKey}?imageInfo 
HTTP/1.1

參數

名稱 描述
imageInfo 獲取圖片基本信息操作標識符,值為空

返回值

名稱 描述 是否必須
Height 圖像高度
Width 圖像寬度
Size 圖像大小
Type 圖像類型
Orientation 旋轉方向

示例

https://img-sample.nos-eastchina1.126.net/Koala.jpg?imageInfo

   <?xml version="1.0" encoding="UTF-8"?>
    <ImageInfoResult>
       <Width>1024</Width>
       <Height>768</Height>
       <Size>780831</Size>
       <Type>JPEG</Type>
       <Orientation/>
    </ImageInfoResult>

獲取圖片EXIF信息

描述

獲取圖片的 exif 信息,如作者,拍攝時間等

接口

GET /${ObjectKey}?exif  
HTTP/1.1

參數

名稱 描述
exif 獲取圖片的exif信息,值為空

返回值

包含 exif 信息的 json 體

示例

https://img-sample.nos-eastchina1.126.net/Koala.jpg?imageInfo

    {
        Exif: {
	    Image: {
	        0xea1c: "",
		Artist: "Corbis",
		DateTime: "2009:03:12 13:48:28",
		ExifTag: "125",
		Rating: "4",
		RatingPercent: "63",
		XPAuthor: ""
	    },
	    Photo: {
		0xea1c: "",
		DateTimeDigitized: "2008:02:11 11:32:43",
		DateTimeOriginal: "2008:02:11 11:32:43",
		SubSecTimeDigitized: "17",
		SubSecTimeOriginal: "17"
	    },
	    Thumbnail: {
		Compression: "JPEG (old-style)",
		JPEGInterchangeFormat: "313",
		JPEGInterchangeFormatLength: "4834",
		XResolution: "72",
		YResolution: "72"
	    }
	}
    }

去除圖片元數據

描述

去除或保留圖片如作者,拍攝設備等元數據。

接口

GET /${ObjectKey}?imageView&stripmeta=0 
HTTP/1.1

參數

名稱 描述 取值範圍
stripmeta 元數據操作的關鍵字 0和1,0保留元數據,1去除元數據

示例

保留圖片元數據:

效果圖:https://img-sample.nos-eastchina1.126.net/Koala.jpg?imageView&stripmeta=0

獲取視頻信息

描述

用於獲取視頻基本信息,需以vinfo作為請求操作標識

接口

GET /${ObjectKey}?vframe 
HTTP/1.1

參數

名稱 描述
vinfo 獲取視頻的基本信息,值為空

返回值

包含視頻信息的json體

示例

https://img-sample.nos-eastchina1.126.net/sample.wmv?vinfo

    {
	GetVideoInfo: {
	    VideoInfo: {
		FrameRate: 0,
		VideoBitrate: 5802,
		VideoCodec: "vc1 (Advanced) (WVC1 / 0x31435657)",
		Duration: 30093,
		Width: 1280,
		Encoder: "",
		AudioBitrate: 187,
		AudioCodec: "wmav2 (a[1][0][0] / 0x0161)",
		Height: 720,
		Start: 0,
		Rotate: 0,
		Size: 26246026,
		Container: "asf"
	    },
	    Object: "sample.wmv",
	    Bucket: "img-sample"
	}
    }

最後更新:2017-01-03 10:48:56

  上一篇:go DockerHub鏡像加速
  下一篇:go CDN價格與計費