获取基本信息和exif信息

可以通过 info操作来获取文件的基本信息,包括宽度、长度、文件大小、格式。如果文件有exif信息,则返回exif信息;如果文件没有exif信息,则只返回基本信息。返回结果是json格式。exif详情可以参考EXIF2.31

请求格式

操作名称:info

返回格式

json格式

示例

  • 没有exif 的例子

    http://image-demo.oss-cn-hangzhou.aliyuncs.com/example.jpg?x-oss-process=image/info

    {
      "FileSize": {"value": "21839"},
      "Format": {"value": "jpg"},
      "ImageHeight": {"value": "267"},
      "ImageWidth": {"value": "400"}
    }
  • 有exif 的例子

    http://image-demo.oss-cn-hangzhou.aliyuncs.com/f.jpg?x-oss-process=image/info

    {
      "Compression": {"value": "6"},
      "DateTime": {"value": "2015:02:11 15:38:27"},
      "ExifTag": {"value": "2212"},
      "FileSize": {"value": "23471"},
      "Format": {"value": "jpg"},
      "GPSLatitude": {"value": "0deg "},
      "GPSLatitudeRef": {"value": "North"},
      "GPSLongitude": {"value": "0deg "},
      "GPSLongitudeRef": {"value": "East"},
      "GPSMapDatum": {"value": "WGS-84"},
      "GPSTag": {"value": "4292"},
      "GPSVersionID": {"value": "2 2 0 0"},
      "ImageHeight": {"value": "333"},
      "ImageWidth": {"value": "424"},
      "JPEGInterchangeFormat": {"value": "4518"},
      "JPEGInterchangeFormatLength": {"value": "3232"},
      "Orientation": {"value": "7"},
      "ResolutionUnit": {"value": "2"},
      "Software": {"value": "Microsoft Windows Photo Viewer 6.1.7600.16385"},
      "XResolution": {"value": "96/1"},
      "YResolution": {"value": "96/1"}}