腾讯云对象存储获取图片信息

获取图片信息

获取图片基本信息及exif信息

参数:

操作方式指令含义参数格式参数说明结果说明保留jpg,webp,tiff图片meta信息Notstripns默认去除所有格式图片meta信息
指定ns后,保留获取图片基本信息Imageinformationimginfo可选参数返回json格式结果,包含:
format图片格式
width宽
height高
fileSize文件字节数
imgType文件类型,取值范围[0UndefinedType,
1BilevelType,
2GrayscaleType,
3GrayscaleMatteType,
4PaletteType,
5PaletteMatteType,
6TrueColorType,
7TrueColorMatteType,
8ColorSeparationType,
9ColorSeparationMatteType,
10OptimizeType]
orientation原始EXIF方向,取值范围[
0UndefinedOrientation,
1TopLeftOrientation,
2TopRightOrientation,
3BottomRightOrientation,
4BottomLeftOrientation,
5LeftTopOrientation,
6RightTopOrientation,
7RightBottomOrientation,
8LeftBottomOrientation]获取图片EXIF信息ImageEXIFImgexif可选参数支持jpg,tiff格式图片

示例:

获取图片基本信息:

http://s3.cn-north-1.jcloud-oss.com/downloads/example.jpg?x-oss-process=imginfo/ns

返回结果:

{"format":"JPEG","width":350,"height":236,"fileSize":38539,"imgType":6,"orientation":1}获取图片EXIF信息:

http://s3.cn-north-1.jcloud-oss.com/downloads/example.jpg?x-oss-process=imgexif

返回结果:

{"FileType":"JPEG","FileSize":"38539","ImageWidth":"350","ImageHeight":"236","Make":"Canon","Model":"CanonEOS1100D","Software":"www.meitu.com","ExposureTime":"1/200","ExifOffset":"118","ExposureTime":"1/200","FNumber":"5/1","ISOSpeedRatings":"160,0","DateTimeOriginal":"2013:05:1716:21:36","Flash":"16,0","FocalLength":"140/1","LensModel":"EF75-300mmf/4-5.6"}