Previous: ISL Introduction Next: More on Generating Images Table of contents Frames User guide
Unidata IDV Workshop for version 6.3 > Advanced Topics > Scripting with IDV

4.3.1 Generating Images
Load in a bundle and generate a screen shot.
  1. First of all save this isl.xidv file to your isl directory.
  2. Run this file:
    <isl debug="true" offscreen="false">
         <bundle file="isl.xidv"/>
    </isl>
    
    image1.isl
  3. Now, change directory to the home directory (cd) and run:
    runIDV /home/idv/isl/image1.isl
    
  4. What happened?
  5. The bundle reference in the isl was relative to where you run the idv from. We'll use the islpath property:
    <isl debug="true" offscreen="false">
         <bundle file="${islpath}/isl.xidv"/>
    </isl>
    
    image2.isl
  6. Note, no images were created. Only the bundle was loaded. To create an image we'll use the image tag:
    <isl debug="true" offscreen="false">
         <bundle file="${islpath}/isl.xidv"/>
    
    <!-- Wait until everything is loaded -->
         <pause/>
    
    <!-- Take a screen shot -->
         <image file="${islpath}/isl.png"/>
    </isl>
    
    image3.isl
  7. The movie tag lets us create a time-loop movie or animated gif.
    <isl debug="true" offscreen="false">
         <bundle file="${islpath}/isl.xidv"/>
    
         <pause/>
    
    <!-- Generate an quicktime movie -->
         <movie file="${islpath}/isl.mov"/>
    
    <!-- Generate an animate gif -->
         <movie file="${islpath}/isl.gif"/>
    </isl>
    
    image4.isl
  8. The IDV gives you an easy way to save off a basic ISL file. Run the IDV with the above bundles. Select File→Save As... and choose the /home/idv/isl directory and enter image.isl.
  9. At the ISL Properties dialog:
    1. Turn off Offscreen.
    2. Turn off Image
    3. Turn on Movie and enter image.kmz.
    4. Press OK. This saves a bundle (image.xidv) and an ISL file.
  10. The ISL file should look like this:
    <?xml version="1.0" encoding="ISO-8859-1"?>
    <isl debug="true" loop="1" offscreen="false" sleep="3600">
      <bundle clear="true" file="${islpath}/image.xidv" wait="true"/>
      <movie file="${islpath}/image.kmz"/>
    </isl>
    
    image.isl
  11. If we enter a kmz suffix for the movie the IDV will generate a Google Earth kmz file of the animation loop.
  12. Now, we'll show you an easier way to do all of this.

 


Previous: ISL Introduction Next: More on Generating Images Table of contents Frames User guide
Unidata IDV Workshop for version 6.3 > Advanced Topics > Scripting with IDV