Adobe XMP标准中描述的序列化和嵌入到全景照片中的Photo Sphere XMP元数据的Swift解析器。
Swift 3.0+ (Xcode 8.0+)
import PhotoSphereXMP
// Create a Parser by URL
let xmp = PhotoSphereXMP(contentsOf: url) // Return is optional
// Create a Parser by DATA
let xmp = PhotoSphereXMP(data: data)
// Parse the content
xmp.parse { (elements: [PhotoSphereXMP.GPano: Any]?, error: Error?) -> Void in
// Check error and do something with the metadata dictionary
}
名称 | 类型 | GPano枚举名称 | Swift类型 |
---|---|---|---|
GPano:UsePanoramaViewer | 布尔值 | usePanoramaViewer | Bool |
GPano:CaptureSoftware | 字符串 | captureSoftware | 字符串 |
GPano:StitchingSoftware | 字符串 | stitchingSoftware | 字符串 |
GPano:ProjectionType | 文本选项 | projectionType | 字符串 |
GPano:PoseHeadingDegrees | 真实值 | poseHeadingDegrees | Double |
GPano:PosePitchDegrees | 真实值 | posePitchDegrees | Double |
GPano:PoseRollDegrees | 真实值 | poseRollDegrees | Double |
GPano:InitialViewHeadingDegrees | 整数值 | initialViewHeadingDegrees | Int |
GPano:InitialViewPitchDegrees | 整数值 | initialViewPitchDegrees | Int |
GPano:InitialViewRollDegrees | 整数值 | initialViewRollDegrees | Int |
GPano:InitialHorizontalFOVDegrees | 真实值 | initialHorizontalFOVDegrees | Double |
GPano:FirstPhotoDate | 日期 | firstPhotoDate | 日期 |
GPano:LastPhotoDate | 日期 | lastPhotoDate | 日期 |
GPano:SourcePhotosCount | 整数值 | sourcePhotosCount | Int |
GPano:ExposureLockUsed | 布尔值 | exposureLockUsed | Bool |
GPano:CroppedAreaImageWidthPixels | 整数值 | croppedAreaImageWidthPixels | Int |
GPano:CroppedAreaImageHeightPixels | 整数值 | croppedAreaImageHeightPixels | Int |
GPano:FullPanoWidthPixels | 整数值 | fullPanoWidthPixels | Int |
GPano:FullPanoHeightPixels | 整数值 | fullPanoHeightPixels | Int |
GPano:CroppedAreaLeftPixels | 整数值 | croppedAreaLeftPixels | Int |
GPano:CroppedAreaTopPixels | 整数值 | croppedAreaTopPixels | Int |
GPano:InitialCameraDolly | 真实值 | initialCameraDolly | Double |
此库采用MIT许可。完整许可文本可在LICENSE中查看。