Latest 1.0.0
Homepage https://github.com/tatsu/PhotoSphereXMP
License MIT
Platforms ios 9.0
Authors

A Swift Parser for Photo Sphere XMP metadata that is serialized and embedded inside the photo sphere as described by the Adobe XMP standard.

Requirements

Swift 3.0+ (Xcode 8.0+)

Installation

CocoaPods

CocoaPods is a dependency manager for Cocoa projects. You can install it with the following command:

$ gem install cocoapods

At the time of writing, –pre option is a must for Xcode 8.

To integrate PhotoSphereXMP into your Xcode project using CocoaPods, specify it in your Podfile:

platform :ios, '9.0'
use_frameworks!

target '<Your Target Name>' do
  pod 'PhotoSphereXMP', '~> 1.0.0'
end

Then, run the following command:

$ pod install

Carthage

Carthage is a decentralized dependency manager that builds your dependencies and provides you with binary frameworks.

You can install Carthage with Homebrew using the following command:

$ brew update
$ brew install carthage

To integrate PhotoSphereXMP into your Xcode project using Carthage, specify it in your Cartfile:

github "tatsu/PhotoSphereXMP" ~> 1.0.0

Run carthage update to build the framework and drag the built PhotoSphereXMP.framework into your Xcode project.

Usage

Sample code

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
    }

Metadata properties

Name Type GPano enum case name Swift type
GPano:UsePanoramaViewer Boolean usePanoramaViewer Bool
GPano:CaptureSoftware String captureSoftware String
GPano:StitchingSoftware String stitchingSoftware String
GPano:ProjectionType Open Choice of Text projectionType String
GPano:PoseHeadingDegrees Real poseHeadingDegrees Double
GPano:PosePitchDegrees Real posePitchDegrees Double
GPano:PoseRollDegrees Real poseRollDegrees Double
GPano:InitialViewHeadingDegrees Integer initialViewHeadingDegrees Int
GPano:InitialViewPitchDegrees Integer initialViewPitchDegrees Int
GPano:InitialViewRollDegrees Integer initialViewRollDegrees Int
GPano:InitialHorizontalFOVDegrees Real initialHorizontalFOVDegrees Double
GPano:FirstPhotoDate Date firstPhotoDate Date
GPano:LastPhotoDate Date lastPhotoDate Date
GPano:SourcePhotosCount Integer sourcePhotosCount Int
GPano:ExposureLockUsed Boolean exposureLockUsed Bool
GPano:CroppedAreaImageWidthPixels Integer croppedAreaImageWidthPixels Int
GPano:CroppedAreaImageHeightPixels Integer croppedAreaImageHeightPixels Int
GPano:FullPanoWidthPixels Integer fullPanoWidthPixels Int
GPano:FullPanoHeightPixels Integer fullPanoHeightPixels Int
GPano:CroppedAreaLeftPixels Integer croppedAreaLeftPixels Int
GPano:CroppedAreaTopPixels Integer croppedAreaTopPixels Int
GPano:InitialCameraDolly Real initialCameraDolly Double

References

License

This library is licensed under MIT. Full license text is available in LICENSE.

Latest podspec

{
    "name": "PhotoSphereXMP",
    "version": "1.0.0",
    "summary": "Photo Sphere XMP Parser in Swift",
    "description": "A Swift Parser for Photo Sphere XMP metadata that is serialized and embedded inside the photo sphere as described by the Adobe XMP standard.",
    "homepage": "https://github.com/tatsu/PhotoSphereXMP",
    "license": "MIT",
    "authors": {
        "Tatsuhiko Arai": "[email protected]"
    },
    "platforms": {
        "ios": "9.0"
    },
    "source": {
        "git": "https://github.com/tatsu/PhotoSphereXMP.git",
        "tag": "1.0.0"
    },
    "source_files": [
        "PhotoSphereXMP",
        "PhotoSphereXMP/**/*.{h,m}"
    ]
}

Pin It on Pinterest

Share This