PhotoSphereXMP 1.0.0

PhotoSphereXMP 1.0.0

测试已测试
Lang语言 SwiftSwift
许可 MIT
发布上次发布2016年9月
SPM支持SPM

Arai Tatsuhiko维护。



  • Arai Tatsuhiko

PhotoSphereXMP

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中查看。