I want to use google's API for displaying panoramas. Apparently I need for input a jpg with the panorama, in which I embed the metadata in XMP format. How can this be done? is it my job as a developer or the one's who creates the panorama? can this be done with a tool? ie photoshop?
可以将文章内容翻译成中文,广告屏蔽插件可能会导致该功能失效(如失效,请关闭广告屏蔽插件后再试):
问题:
回答1:
Ok this is how I did it, I used photoshop which has an option to pass metadata from a custom template so I created an XMP file using the metadata mentioned in google documentation page. Hope it helps anyone who finds this post!
<?xpacket begin='' id=''?><x:xmpmeta xmlns:x='adobe:ns:meta/'>
<rdf:RDF xmlns:rdf='http://www.w3.org/1999/02/22-rdf-syntax-ns#'>
<rdf:Description rdf:about="" xmlns:GPano="http://ns.google.com/photos/1.0/panorama/">
<GPano:UsePanoramaViewer>True</GPano:UsePanoramaViewer>
<GPano:CaptureSoftware>Photo Sphere</GPano:CaptureSoftware>
<GPano:StitchingSoftware>Photo Sphere</GPano:StitchingSoftware>
<GPano:ProjectionType>equirectangular</GPano:ProjectionType>
<GPano:PoseHeadingDegrees>350.0</GPano:PoseHeadingDegrees>
<GPano:InitialViewHeadingDegrees>90.0</GPano:InitialViewHeadingDegrees>
<GPano:InitialViewPitchDegrees>0.0</GPano:InitialViewPitchDegrees>
<GPano:InitialViewRollDegrees>0.0</GPano:InitialViewRollDegrees>
<GPano:InitialHorizontalFOVDegrees>75.0</GPano:InitialHorizontalFOVDegrees>
<GPano:CroppedAreaLeftPixels>0</GPano:CroppedAreaLeftPixels>
<GPano:CroppedAreaTopPixels>0</GPano:CroppedAreaTopPixels>
<GPano:CroppedAreaImageWidthPixels>4000</GPano:CroppedAreaImageWidthPixels>
<GPano:CroppedAreaImageHeightPixels>2000</GPano:CroppedAreaImageHeightPixels>
<GPano:FullPanoWidthPixels>4000</GPano:FullPanoWidthPixels>
<GPano:FullPanoHeightPixels>2000</GPano:FullPanoHeightPixels>
<GPano:FirstPhotoDate>2012-11-07T21:03:13.465Z</GPano:FirstPhotoDate>
<GPano:LastPhotoDate>2012-11-07T21:04:10.897Z</GPano:LastPhotoDate>
<GPano:SourcePhotosCount>50</GPano:SourcePhotosCount>
<GPano:ExposureLockUsed>False</GPano:ExposureLockUsed>
</rdf:Description>
</rdf:RDF>