lytro


 Get Microsoft Silverlight

[simply-silverlight xap=filename.xap param name=”initParams” value=”lfp=IMG_0220.lfp”]

 

http://optics.miloush.net/lytro/TheSilverlightPlugin.aspx

plugin is in root

 

  1. Download the Silverlight application: LightFieldPlayer.xap
  2. If you do not have any other Silverlight applications, you might also want to improve the client experience with the plugin installation script: Silverlight.js
  3. Put the files on your website.
  4. In the Lytro Desktop software, right click on the image you want to show on your page and select Export…. In the Save as type drop down, select Stack Lfp (*.lfp) and save the file to the folder with the application. (If you do not have the desktop software, the stacklq.lfp file from the Lytro library can be used, but it has much worse quality.)In older versions, you might look for the IMG_####-stk.lfp file in the Lytro library. It is important to take the STK version without H.264 frames, the application will not display any other files. Put it to the folder with the application.
  5. On the place where you want to show your picture, put the following code:
    <object data=”data:application/x-silverlight-2,” type=”application/x-silverlight-2″ width=”500″ height=”500″> <param name=”source” value=”TheSilverlightPlugin/LightFieldPlayer.xap” /> <param name=”background” value=”white” /> <param name=”minRuntimeVersion” value=”5.0.61118.0″ /> <param name=”autoUpgrade” value=”true” /> <param name=”initParams” value=”lfp=IMG_####-stk.lfp,thumb=pic_#####.jpg” /> <a href=”http://go.microsoft.com/fwlink/?LinkID=149156&v=5.0.61118.0″ style=”text-decoration:none”> <img src=”http://go.microsoft.com/fwlink/?LinkId=161376″ alt=”Get Microsoft Silverlight” style=”border-style:none” /> </a> </object>
  6. Set the initParams’ lfp variable to the STK file from step 4. If you have a thumbnail to display until the Living Picture loads, set it in the thumb variable ibidem. If not, just remove the thumb variable.
  7. Deploy and enjoy. You should include a disclaimer on the page, that your not affiliated with or endorsed by Lytro, Inc. in any way (until the SDK becomes officially available).

supported variables

The following list of variables is supported in the initParams parameter of the object, use the variable1=value1,variable2=value2 syntax.

Property lfpMandatory. A relative or absolute URI to the LFP file. If the file is in the same folder as the Silverlight application, just the file name is enough. The file itself must contain prerendered images, which is usually indicated by the name ending with -stk.lfp.
Property thumbA relative URI to the thumbnail image to display until the LFP file loads completely. The file can be any image format supported by the Silverlight runtime. It must be, however, in the folder of the application (or any subfolder).
Property captionText to display at the bottom of the picture. Obviously it cannot contain comma directly, but it can be URL encoded (%2c).
Property photographerHeader to display at the bottom of the picture. Commas must be URL encoded. The caption variable must be set to make the header visible.
Property defaultLambdaOverrides the initial focus plane stored in the lfp file. The nearest prerendered plane available will be shown.
Property showSliderTrue to display slider to control the focus plane in addition to clicking on the picture. Default is False.
Property durationNumber of milliseconds for the refocus animation (and others). Use 0 to disable animations. Default is 1000.
Property stretchHow to display the picture if its dimensions do not match the dimensions of the Silverlight object. Allowed values are NoneUniformUniformToFill and Fill. Default is Uniform.
Property radiusRounded corners radius. Default is 0 (not rounded).
Property cultureOverrides the plug-in culture. This value is used for numbers and dates formatting, currently without visible effect. Default depends on the visitor’s preference.
Property uicultureOverrides the plug-in interface culture. This value is used for loading resources and can be used to force a localization language. Default depends on the visitor’s preference.

notes

Sliverlight version 5 is required. Supported languages are English, Czech (čeština) and Tamil (தமிழ்). Let me know if you would be interested in localizing into another languages.

This plugin was not approved by Lytro, Inc.